usb: gadget: composite: Add usb_remove_config
authorBenoit Goby <benoit@android.com>
Thu, 26 May 2011 06:59:43 +0000 (23:59 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:08:59 +0000 (12:08 -0800)
commitcb678a3a725816b3d76d0e822c6e7e786e756f82
treeaaff8aecba1de14aaef186176b5201af2d45896e
parent5fc2144917b451098fce2e2b2762be85a8023c8b
usb: gadget: composite: Add usb_remove_config

This allows composite drivers to dynamically change their configuration.
For example, a driver might remove a configuration and register a new
one with a different set of functions.
User should prevent the host from enumerating the device while changing
the configuration:

usb_gadget_disconnect(cdev->gadget);
usb_remove_config(cdev, old_config);
usb_add_config(cdev, new_config, new_conf_bind);
usb_gadget_connect(cdev->gadget);

Change-Id: Icbfb4ce41685fde9bf63d5d58fca1ad242aa69f9
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/usb/gadget/composite.c
include/linux/usb/composite.h