diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-02-06 18:46:35 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-09 10:10:57 +0200 |
commit | 609ca228073ae06c5513474d2cdf0af7ee5766ec (patch) | |
tree | c6d1fe216bade3bb47a5b8d54d9f478ea507dda0 /drivers/usb/gadget/serial.c | |
parent | 637b78eb31e0b167ed913f1750bb645dfeda38f0 (diff) | |
download | op-kernel-dev-609ca228073ae06c5513474d2cdf0af7ee5766ec.zip op-kernel-dev-609ca228073ae06c5513474d2cdf0af7ee5766ec.tar.gz |
usb: gadget: clean the ep in autoconf before returning it.
Since commit 72c973dd aka ("usb: gadget: add usb_endpoint_descriptor to
struct usb_ep) the descriptor is part of the ep. Most gadgets like
g_zero or masstorage call config_ep_by_speed() to grab an available
endpoint which may be used for FS/HS/SS bulk/iso/intr and in a second
they assign the proper descriptor by calling config_ep_by_speed(). This
is good so far. A few of them like ncm call config_ep_by_speed() only if
ep->desc not assigned earlier. That means ep->desc is never assigned if
the endpoint was used by another gadget before it was removed.
Some of those gadgets also assign ep->driver_data to NULL on reset or
ep_disable part _but_ keep a reference to this endpoint. At ep_enable
time they assign driver_data to their private data. This probably needs
a clean up of its own.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/serial.c')
0 files changed, 0 insertions, 0 deletions