usb: gadget: f_ecm: allocate/free net device upon driver bind/unbind

Driver registers net device in bind but does not unregister it
upon driver unbind. Upon composition switch ecm net device is no
longer in use, hence unregister and free it in driver unbind.
Unregistering net device sends notification to user space which
can be used by user space entities to perform necessary actions
for example updating UI. Symmetrically allocate and register net
device in driver bind.

Change-Id: Ic7847723b60abc317e2b4f4a60ea73e1672abce7
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
1 file changed