usb: gadget: composite: Add usb_remove_config
authorBenoit Goby <benoit@android.com>
Thu, 26 May 2011 06:59:43 +0000 (23:59 -0700)
committerBenoit Goby <benoit@android.com>
Fri, 17 Jun 2011 23:02:36 +0000 (16:02 -0700)
commit94df1bdfdca9be6d4bbe6cc56354b4ee536cb15a
tree931674516b4ed279dafb466957c01166df9636b1
parentf6e7d49e03c475a7f129a0b13ff80bff2abbb2b2
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