summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/mass_storage.c
diff options
context:
space:
mode:
authorMichal Nazarewicz <m.nazarewicz@samsung.com>2010-08-12 17:43:54 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 10:21:25 -0700
commit07a18bd716ed5dea336429404b132568cfaaef95 (patch)
tree1ff7719e2e0e022cff3ed420bc1c332662a1a48c /drivers/usb/gadget/mass_storage.c
parentb0fca50f5a94a268ed02cfddf44448051ed9343f (diff)
usb gadget: don't save bind callback in struct usb_composite_driver
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 composite driver structure. This fixes many section mismatches reported by modpost. Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/mass_storage.c')
-rw-r--r--drivers/usb/gadget/mass_storage.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/mass_storage.c b/drivers/usb/gadget/mass_storage.c
index 05e9bd330348..a5e4a777d922 100644
--- a/drivers/usb/gadget/mass_storage.c
+++ b/drivers/usb/gadget/mass_storage.c
@@ -169,7 +169,6 @@ static int __init msg_bind(struct usb_composite_dev *cdev)
static struct usb_composite_driver msg_driver = {
.name = "g_mass_storage",
.dev = &msg_device_desc,
- .bind = msg_bind,
.iProduct = DRIVER_DESC,
.needs_serial = 1,
};
@@ -180,7 +179,7 @@ MODULE_LICENSE("GPL");
static int __init msg_init(void)
{
- return usb_composite_register(&msg_driver);
+ return usb_composite_probe(&msg_driver, msg_bind);
}
module_init(msg_init);