diff options
Diffstat (limited to 'drivers/usb/gadget/webcam.c')
-rw-r--r-- | drivers/usb/gadget/webcam.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/gadget/webcam.c b/drivers/usb/gadget/webcam.c index de1deb7a3c63..a5a0fdb808c7 100644 --- a/drivers/usb/gadget/webcam.c +++ b/drivers/usb/gadget/webcam.c | |||
@@ -308,7 +308,7 @@ static const struct uvc_descriptor_header * const uvc_hs_streaming_cls[] = { | |||
308 | * USB configuration | 308 | * USB configuration |
309 | */ | 309 | */ |
310 | 310 | ||
311 | static int __ref | 311 | static int __init |
312 | webcam_config_bind(struct usb_configuration *c) | 312 | webcam_config_bind(struct usb_configuration *c) |
313 | { | 313 | { |
314 | return uvc_bind_config(c, uvc_control_cls, uvc_fs_streaming_cls, | 314 | return uvc_bind_config(c, uvc_control_cls, uvc_fs_streaming_cls, |
@@ -317,7 +317,6 @@ webcam_config_bind(struct usb_configuration *c) | |||
317 | 317 | ||
318 | static struct usb_configuration webcam_config_driver = { | 318 | static struct usb_configuration webcam_config_driver = { |
319 | .label = webcam_config_label, | 319 | .label = webcam_config_label, |
320 | .bind = webcam_config_bind, | ||
321 | .bConfigurationValue = 1, | 320 | .bConfigurationValue = 1, |
322 | .iConfiguration = 0, /* dynamic */ | 321 | .iConfiguration = 0, /* dynamic */ |
323 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, | 322 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, |
@@ -330,7 +329,7 @@ webcam_unbind(struct usb_composite_dev *cdev) | |||
330 | return 0; | 329 | return 0; |
331 | } | 330 | } |
332 | 331 | ||
333 | static int __ref | 332 | static int __init |
334 | webcam_bind(struct usb_composite_dev *cdev) | 333 | webcam_bind(struct usb_composite_dev *cdev) |
335 | { | 334 | { |
336 | int ret; | 335 | int ret; |
@@ -354,7 +353,8 @@ webcam_bind(struct usb_composite_dev *cdev) | |||
354 | webcam_config_driver.iConfiguration = ret; | 353 | webcam_config_driver.iConfiguration = ret; |
355 | 354 | ||
356 | /* Register our configuration. */ | 355 | /* Register our configuration. */ |
357 | if ((ret = usb_add_config(cdev, &webcam_config_driver)) < 0) | 356 | if ((ret = usb_add_config(cdev, &webcam_config_driver, |
357 | webcam_config_bind)) < 0) | ||
358 | goto error; | 358 | goto error; |
359 | 359 | ||
360 | INFO(cdev, "Webcam Video Gadget\n"); | 360 | INFO(cdev, "Webcam Video Gadget\n"); |
@@ -373,14 +373,13 @@ static struct usb_composite_driver webcam_driver = { | |||
373 | .name = "g_webcam", | 373 | .name = "g_webcam", |
374 | .dev = &webcam_device_descriptor, | 374 | .dev = &webcam_device_descriptor, |
375 | .strings = webcam_device_strings, | 375 | .strings = webcam_device_strings, |
376 | .bind = webcam_bind, | ||
377 | .unbind = webcam_unbind, | 376 | .unbind = webcam_unbind, |
378 | }; | 377 | }; |
379 | 378 | ||
380 | static int __init | 379 | static int __init |
381 | webcam_init(void) | 380 | webcam_init(void) |
382 | { | 381 | { |
383 | return usb_composite_register(&webcam_driver); | 382 | return usb_composite_probe(&webcam_driver, webcam_bind); |
384 | } | 383 | } |
385 | 384 | ||
386 | static void __exit | 385 | static void __exit |