diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-08-12 11:43:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 13:21:25 -0400 |
commit | b0fca50f5a94a268ed02cfddf44448051ed9343f (patch) | |
tree | bc398947bcf6355f05ec33e4fea6a0b1927384ac /drivers/usb/gadget/file_storage.c | |
parent | e12995ec8f8d99f2a339541fc28998af2d60af0f (diff) |
usb gadget: don't save bind callback in struct usb_gadget_driver
To accomplish this the function to register a gadget driver takes the bind
function as a second argument. To make things clearer rename the function
to resemble platform_driver_probe.
This fixes many section mismatches like
WARNING: drivers/usb/gadget/g_printer.o(.data+0xc): Section mismatch in
reference from the variable printer_driver to the function
.init.text:printer_bind()
The variable printer_driver references
the function __init printer_bind()
All callers are fixed.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
[m.nazarewicz@samsung.com: added dbgp]
Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/file_storage.c')
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index aae04c20b0ea..132a1c0877bd 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -3608,7 +3608,6 @@ static struct usb_gadget_driver fsg_driver = { | |||
3608 | .speed = USB_SPEED_FULL, | 3608 | .speed = USB_SPEED_FULL, |
3609 | #endif | 3609 | #endif |
3610 | .function = (char *) fsg_string_product, | 3610 | .function = (char *) fsg_string_product, |
3611 | .bind = fsg_bind, | ||
3612 | .unbind = fsg_unbind, | 3611 | .unbind = fsg_unbind, |
3613 | .disconnect = fsg_disconnect, | 3612 | .disconnect = fsg_disconnect, |
3614 | .setup = fsg_setup, | 3613 | .setup = fsg_setup, |
@@ -3650,7 +3649,7 @@ static int __init fsg_init(void) | |||
3650 | if ((rc = fsg_alloc()) != 0) | 3649 | if ((rc = fsg_alloc()) != 0) |
3651 | return rc; | 3650 | return rc; |
3652 | fsg = the_fsg; | 3651 | fsg = the_fsg; |
3653 | if ((rc = usb_gadget_register_driver(&fsg_driver)) != 0) | 3652 | if ((rc = usb_gadget_probe_driver(&fsg_driver, fsg_bind)) != 0) |
3654 | kref_put(&fsg->ref, fsg_release); | 3653 | kref_put(&fsg->ref, fsg_release); |
3655 | return rc; | 3654 | return rc; |
3656 | } | 3655 | } |