]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_mass_storage: reset endpoint driver data when disabled
authorPeter Oh <poh@broadcom.com>
Mon, 16 Sep 2013 21:21:14 +0000 (14:21 -0700)
committerFelipe Balbi <balbi@ti.com>
Tue, 17 Sep 2013 16:07:14 +0000 (11:07 -0500)
commit00ac1ab9001dacb55d7dbcead6053b96d3ed627a
tree7c04fbc3dd7f4584935c3f8e5b3498b3813232b4
parent28cc187f4ec0b86639c7933b85b4a510e63fb5b3
usb: gadget: f_mass_storage: reset endpoint driver data when disabled

Gadgets endpoint driver data is a criteria to judge that
whether the endpoints are in use or not. When gadget gets
assigned an endpoint from endpoint list, they check its
driver data if the driver data is NULL.

If the driver data is not NULL then they regard it as in use.
Therefore all of gadgets should reset their endpoints driver
data to NULL as they are disabled. Otherwise it causes a leak
of endpoint resource.

Signed-off-by: Peter Oh <poh@broadcom.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/f_mass_storage.c