diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-09-06 20:11:05 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-09-10 15:35:16 +0300 |
commit | 93952956c7078eb41058c5ccc5b34ae6cf59bb64 (patch) | |
tree | 99f00baae3db9f776e8518525502a464f5a9c4f4 /drivers/usb/gadget/file_storage.c | |
parent | 03e42bd5937c4c24e411690ab165627e93c258b5 (diff) |
usb: gadget: move bind() callback back to struct usb_gadget_driver
This partly reverts 07a18bd7 ("usb gadget: don't save bind callback in
struct usb_composite_driver") and fixes new drivers. The section missmatch
problems was solved by whitelisting bind callback in modpost.
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/file_storage.c')
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 683234bcdce..ce186fa7e7b 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -3606,6 +3606,7 @@ static void fsg_resume(struct usb_gadget *gadget) static __refdata struct usb_gadget_driver fsg_driver = { .max_speed = USB_SPEED_SUPER, .function = (char *) fsg_string_product, + .bind = fsg_bind, .unbind = fsg_unbind, .disconnect = fsg_disconnect, .setup = fsg_setup, @@ -3653,7 +3654,8 @@ static int __init fsg_init(void) if ((rc = fsg_alloc()) != 0) return rc; fsg = the_fsg; - if ((rc = usb_gadget_probe_driver(&fsg_driver, fsg_bind)) != 0) + rc = usb_gadget_probe_driver(&fsg_driver); + if (rc != 0) kref_put(&fsg->ref, fsg_release); return rc; } |