usb: gadget: composite: Add usb_remove_config
authorBenoit Goby <benoit@android.com>
Thu, 10 May 2012 08:07:57 +0000 (10:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 May 2012 19:21:32 +0000 (12:21 -0700)
commit51cce6fc155c4d7eea2ff975ee7c82b89332c6d9
tree08272c25d5e7dfb95df2261699f44ad4eb4da60e
parent56d95f3174450d22a3b8d936bea2cb414262ce8f
usb: gadget: composite: Add usb_remove_config

Add usb_remove_config to unbind a configuration and remove it from
the configs list. This allows implementing composite gadget drivers that
can disconnect themself from the bus and that will later be re-enumerated
with a different configuration.

Gadget drivers must call usb_gadget_disconnect before calling this
function to disable the pullup, disconnect the device from the host,
and prevent the host from enumerating the device while we are changing
the gadget configuration.

Signed-off-by: Benoit Goby <benoit@android.com>
[change return type of [usb_]remove_config]
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/composite.c
include/linux/usb/composite.h