aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/dbgp.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-08-12 11:43:53 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 13:21:25 -0400
commitb0fca50f5a94a268ed02cfddf44448051ed9343f (patch)
treebc398947bcf6355f05ec33e4fea6a0b1927384ac /drivers/usb/gadget/dbgp.c
parente12995ec8f8d99f2a339541fc28998af2d60af0f (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/dbgp.c')
-rw-r--r--drivers/usb/gadget/dbgp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/dbgp.c b/drivers/usb/gadget/dbgp.c
index abe4a2ec5625..e5ac8a316fec 100644
--- a/drivers/usb/gadget/dbgp.c
+++ b/drivers/usb/gadget/dbgp.c
@@ -403,7 +403,6 @@ fail:
403static struct usb_gadget_driver dbgp_driver = { 403static struct usb_gadget_driver dbgp_driver = {
404 .function = "dbgp", 404 .function = "dbgp",
405 .speed = USB_SPEED_HIGH, 405 .speed = USB_SPEED_HIGH,
406 .bind = dbgp_bind,
407 .unbind = dbgp_unbind, 406 .unbind = dbgp_unbind,
408 .setup = dbgp_setup, 407 .setup = dbgp_setup,
409 .disconnect = dbgp_disconnect, 408 .disconnect = dbgp_disconnect,
@@ -415,7 +414,7 @@ static struct usb_gadget_driver dbgp_driver = {
415 414
416static int __init dbgp_init(void) 415static int __init dbgp_init(void)
417{ 416{
418 return usb_gadget_register_driver(&dbgp_driver); 417 return usb_gadget_probe_driver(&dbgp_driver, dbgp_bind);
419} 418}
420 419
421static void __exit dbgp_exit(void) 420static void __exit dbgp_exit(void)