aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/hid.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-09-06 14:11:04 -0400
committerFelipe Balbi <balbi@ti.com>2012-09-10 08:34:48 -0400
commit03e42bd5937c4c24e411690ab165627e93c258b5 (patch)
treeb28ce26b26167ceeb4d3dc83dc424fd2e2ecb973 /drivers/usb/gadget/hid.c
parentc2ec75c25112c9e0d9053f55ba8cf0a358d4a354 (diff)
usb: gadget: move bind() callback back to struct usb_composite_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 structs in question via __ref. Cc: devel@driverdev.osuosl.org 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/hid.c')
-rw-r--r--drivers/usb/gadget/hid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c
index 34e139e700b4..8502e56d73bc 100644
--- a/drivers/usb/gadget/hid.c
+++ b/drivers/usb/gadget/hid.c
@@ -247,6 +247,7 @@ static __refdata struct usb_composite_driver hidg_driver = {
247 .dev = &device_desc, 247 .dev = &device_desc,
248 .strings = dev_strings, 248 .strings = dev_strings,
249 .max_speed = USB_SPEED_HIGH, 249 .max_speed = USB_SPEED_HIGH,
250 .bind = hid_bind,
250 .unbind = __exit_p(hid_unbind), 251 .unbind = __exit_p(hid_unbind),
251}; 252};
252 253
@@ -272,7 +273,7 @@ static int __init hidg_init(void)
272 if (status < 0) 273 if (status < 0)
273 return status; 274 return status;
274 275
275 status = usb_composite_probe(&hidg_driver, hid_bind); 276 status = usb_composite_probe(&hidg_driver);
276 if (status < 0) 277 if (status < 0)
277 platform_driver_unregister(&hidg_plat_driver); 278 platform_driver_unregister(&hidg_plat_driver);
278 279