aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/ether.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/ether.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/ether.c')
-rw-r--r--drivers/usb/gadget/ether.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 33076bca9936..1690c9d68256 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -251,7 +251,6 @@ static int __init rndis_do_config(struct usb_configuration *c)
251 251
252static struct usb_configuration rndis_config_driver = { 252static struct usb_configuration rndis_config_driver = {
253 .label = "RNDIS", 253 .label = "RNDIS",
254 .bind = rndis_do_config,
255 .bConfigurationValue = 2, 254 .bConfigurationValue = 2,
256 /* .iConfiguration = DYNAMIC */ 255 /* .iConfiguration = DYNAMIC */
257 .bmAttributes = USB_CONFIG_ATT_SELFPOWER, 256 .bmAttributes = USB_CONFIG_ATT_SELFPOWER,
@@ -289,7 +288,6 @@ static int __init eth_do_config(struct usb_configuration *c)
289 288
290static struct usb_configuration eth_config_driver = { 289static struct usb_configuration eth_config_driver = {
291 /* .label = f(hardware) */ 290 /* .label = f(hardware) */
292 .bind = eth_do_config,
293 .bConfigurationValue = 1, 291 .bConfigurationValue = 1,
294 /* .iConfiguration = DYNAMIC */ 292 /* .iConfiguration = DYNAMIC */
295 .bmAttributes = USB_CONFIG_ATT_SELFPOWER, 293 .bmAttributes = USB_CONFIG_ATT_SELFPOWER,
@@ -373,12 +371,13 @@ static int __init eth_bind(struct usb_composite_dev *cdev)
373 371
374 /* register our configuration(s); RNDIS first, if it's used */ 372 /* register our configuration(s); RNDIS first, if it's used */
375 if (has_rndis()) { 373 if (has_rndis()) {
376 status = usb_add_config(cdev, &rndis_config_driver); 374 status = usb_add_config(cdev, &rndis_config_driver,
375 rndis_do_config);
377 if (status < 0) 376 if (status < 0)
378 goto fail; 377 goto fail;
379 } 378 }
380 379
381 status = usb_add_config(cdev, &eth_config_driver); 380 status = usb_add_config(cdev, &eth_config_driver, eth_do_config);
382 if (status < 0) 381 if (status < 0)
383 goto fail; 382 goto fail;
384 383