aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/g_ffs.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-08-12 11:43:55 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 13:21:26 -0400
commitc9bfff9c98671ad50e4abbfe1ab606a9957f7539 (patch)
tree68ca78391c78bde1a82000e34eec70866f5c956e /drivers/usb/gadget/g_ffs.c
parent07a18bd716ed5dea336429404b132568cfaaef95 (diff)
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>
Diffstat (limited to 'drivers/usb/gadget/g_ffs.c')
-rw-r--r--drivers/usb/gadget/g_ffs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c
index 9fcb15879506..af75e3620849 100644
--- a/drivers/usb/gadget/g_ffs.c
+++ b/drivers/usb/gadget/g_ffs.c
@@ -234,11 +234,10 @@ static int gfs_bind(struct usb_composite_dev *cdev)
234 234
235 c->c.label = gfs_strings[i].s; 235 c->c.label = gfs_strings[i].s;
236 c->c.iConfiguration = gfs_strings[i].id; 236 c->c.iConfiguration = gfs_strings[i].id;
237 c->c.bind = gfs_do_config;
238 c->c.bConfigurationValue = 1 + i; 237 c->c.bConfigurationValue = 1 + i;
239 c->c.bmAttributes = USB_CONFIG_ATT_SELFPOWER; 238 c->c.bmAttributes = USB_CONFIG_ATT_SELFPOWER;
240 239
241 ret = usb_add_config(cdev, &c->c); 240 ret = usb_add_config(cdev, &c->c, gfs_do_config);
242 if (unlikely(ret < 0)) 241 if (unlikely(ret < 0))
243 goto error_unbind; 242 goto error_unbind;
244 } 243 }