diff options
Diffstat (limited to 'drivers/usb/gadget/audio.c')
-rw-r--r-- | drivers/usb/gadget/audio.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c index b744ccd0f34d..93b999e49ef3 100644 --- a/drivers/usb/gadget/audio.c +++ b/drivers/usb/gadget/audio.c | |||
@@ -89,7 +89,7 @@ static const struct usb_descriptor_header *otg_desc[] = { | |||
89 | 89 | ||
90 | /*-------------------------------------------------------------------------*/ | 90 | /*-------------------------------------------------------------------------*/ |
91 | 91 | ||
92 | static int __ref audio_do_config(struct usb_configuration *c) | 92 | static int __init audio_do_config(struct usb_configuration *c) |
93 | { | 93 | { |
94 | /* FIXME alloc iConfiguration string, set it in c->strings */ | 94 | /* FIXME alloc iConfiguration string, set it in c->strings */ |
95 | 95 | ||
@@ -105,7 +105,6 @@ static int __ref audio_do_config(struct usb_configuration *c) | |||
105 | 105 | ||
106 | static struct usb_configuration audio_config_driver = { | 106 | static struct usb_configuration audio_config_driver = { |
107 | .label = DRIVER_DESC, | 107 | .label = DRIVER_DESC, |
108 | .bind = audio_do_config, | ||
109 | .bConfigurationValue = 1, | 108 | .bConfigurationValue = 1, |
110 | /* .iConfiguration = DYNAMIC */ | 109 | /* .iConfiguration = DYNAMIC */ |
111 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, | 110 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, |
@@ -113,7 +112,7 @@ static struct usb_configuration audio_config_driver = { | |||
113 | 112 | ||
114 | /*-------------------------------------------------------------------------*/ | 113 | /*-------------------------------------------------------------------------*/ |
115 | 114 | ||
116 | static int __ref audio_bind(struct usb_composite_dev *cdev) | 115 | static int __init audio_bind(struct usb_composite_dev *cdev) |
117 | { | 116 | { |
118 | int gcnum; | 117 | int gcnum; |
119 | int status; | 118 | int status; |
@@ -145,7 +144,7 @@ static int __ref audio_bind(struct usb_composite_dev *cdev) | |||
145 | strings_dev[STRING_PRODUCT_IDX].id = status; | 144 | strings_dev[STRING_PRODUCT_IDX].id = status; |
146 | device_desc.iProduct = status; | 145 | device_desc.iProduct = status; |
147 | 146 | ||
148 | status = usb_add_config(cdev, &audio_config_driver); | 147 | status = usb_add_config(cdev, &audio_config_driver, audio_do_config); |
149 | if (status < 0) | 148 | if (status < 0) |
150 | goto fail; | 149 | goto fail; |
151 | 150 | ||
@@ -166,13 +165,12 @@ static struct usb_composite_driver audio_driver = { | |||
166 | .name = "g_audio", | 165 | .name = "g_audio", |
167 | .dev = &device_desc, | 166 | .dev = &device_desc, |
168 | .strings = audio_strings, | 167 | .strings = audio_strings, |
169 | .bind = audio_bind, | ||
170 | .unbind = __exit_p(audio_unbind), | 168 | .unbind = __exit_p(audio_unbind), |
171 | }; | 169 | }; |
172 | 170 | ||
173 | static int __init init(void) | 171 | static int __init init(void) |
174 | { | 172 | { |
175 | return usb_composite_register(&audio_driver); | 173 | return usb_composite_probe(&audio_driver, audio_bind); |
176 | } | 174 | } |
177 | module_init(init); | 175 | module_init(init); |
178 | 176 | ||