diff options
Diffstat (limited to 'drivers/usb/gadget/nokia.c')
-rw-r--r-- | drivers/usb/gadget/nokia.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c index 7d6b66a85724..b5364f9d7cd2 100644 --- a/drivers/usb/gadget/nokia.c +++ b/drivers/usb/gadget/nokia.c | |||
@@ -135,7 +135,6 @@ static int __init nokia_bind_config(struct usb_configuration *c) | |||
135 | 135 | ||
136 | static struct usb_configuration nokia_config_500ma_driver = { | 136 | static struct usb_configuration nokia_config_500ma_driver = { |
137 | .label = "Bus Powered", | 137 | .label = "Bus Powered", |
138 | .bind = nokia_bind_config, | ||
139 | .bConfigurationValue = 1, | 138 | .bConfigurationValue = 1, |
140 | /* .iConfiguration = DYNAMIC */ | 139 | /* .iConfiguration = DYNAMIC */ |
141 | .bmAttributes = USB_CONFIG_ATT_ONE, | 140 | .bmAttributes = USB_CONFIG_ATT_ONE, |
@@ -144,7 +143,6 @@ static struct usb_configuration nokia_config_500ma_driver = { | |||
144 | 143 | ||
145 | static struct usb_configuration nokia_config_100ma_driver = { | 144 | static struct usb_configuration nokia_config_100ma_driver = { |
146 | .label = "Self Powered", | 145 | .label = "Self Powered", |
147 | .bind = nokia_bind_config, | ||
148 | .bConfigurationValue = 2, | 146 | .bConfigurationValue = 2, |
149 | /* .iConfiguration = DYNAMIC */ | 147 | /* .iConfiguration = DYNAMIC */ |
150 | .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER, | 148 | .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER, |
@@ -206,11 +204,13 @@ static int __init nokia_bind(struct usb_composite_dev *cdev) | |||
206 | } | 204 | } |
207 | 205 | ||
208 | /* finaly register the configuration */ | 206 | /* finaly register the configuration */ |
209 | status = usb_add_config(cdev, &nokia_config_500ma_driver); | 207 | status = usb_add_config(cdev, &nokia_config_500ma_driver, |
208 | nokia_bind_config); | ||
210 | if (status < 0) | 209 | if (status < 0) |
211 | goto err_usb; | 210 | goto err_usb; |
212 | 211 | ||
213 | status = usb_add_config(cdev, &nokia_config_100ma_driver); | 212 | status = usb_add_config(cdev, &nokia_config_100ma_driver, |
213 | nokia_bind_config); | ||
214 | if (status < 0) | 214 | if (status < 0) |
215 | goto err_usb; | 215 | goto err_usb; |
216 | 216 | ||
@@ -241,13 +241,12 @@ static struct usb_composite_driver nokia_driver = { | |||
241 | .name = "g_nokia", | 241 | .name = "g_nokia", |
242 | .dev = &device_desc, | 242 | .dev = &device_desc, |
243 | .strings = dev_strings, | 243 | .strings = dev_strings, |
244 | .bind = nokia_bind, | ||
245 | .unbind = __exit_p(nokia_unbind), | 244 | .unbind = __exit_p(nokia_unbind), |
246 | }; | 245 | }; |
247 | 246 | ||
248 | static int __init nokia_init(void) | 247 | static int __init nokia_init(void) |
249 | { | 248 | { |
250 | return usb_composite_register(&nokia_driver); | 249 | return usb_composite_probe(&nokia_driver, nokia_bind); |
251 | } | 250 | } |
252 | module_init(nokia_init); | 251 | module_init(nokia_init); |
253 | 252 | ||