usb gadget: don't save bind callback in struct usb_configuration
The bind function is most of the time only called at init time so there is no need to save a pointer to it in the configuration structure. This fixes many section mismatches reported by modpost. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [m.nazarewicz@samsung.com: updated for -next] Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
07a18bd716
commit
c9bfff9c98
@@ -317,7 +317,6 @@ webcam_config_bind(struct usb_configuration *c)
|
||||
|
||||
static struct usb_configuration webcam_config_driver = {
|
||||
.label = webcam_config_label,
|
||||
.bind = webcam_config_bind,
|
||||
.bConfigurationValue = 1,
|
||||
.iConfiguration = 0, /* dynamic */
|
||||
.bmAttributes = USB_CONFIG_ATT_SELFPOWER,
|
||||
@@ -354,7 +353,8 @@ webcam_bind(struct usb_composite_dev *cdev)
|
||||
webcam_config_driver.iConfiguration = ret;
|
||||
|
||||
/* Register our configuration. */
|
||||
if ((ret = usb_add_config(cdev, &webcam_config_driver)) < 0)
|
||||
if ((ret = usb_add_config(cdev, &webcam_config_driver,
|
||||
webcam_config_bind)) < 0)
|
||||
goto error;
|
||||
|
||||
INFO(cdev, "Webcam Video Gadget\n");
|
||||
|
Reference in New Issue
Block a user