diff options
Diffstat (limited to 'drivers/usb/gadget/serial.c')
-rw-r--r-- | drivers/usb/gadget/serial.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index b22eedbc7dc5..1ac57a973aa9 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c | |||
@@ -137,7 +137,7 @@ MODULE_PARM_DESC(n_ports, "number of ports to create, default=1"); | |||
137 | 137 | ||
138 | /*-------------------------------------------------------------------------*/ | 138 | /*-------------------------------------------------------------------------*/ |
139 | 139 | ||
140 | static int __ref serial_bind_config(struct usb_configuration *c) | 140 | static int __init serial_bind_config(struct usb_configuration *c) |
141 | { | 141 | { |
142 | unsigned i; | 142 | unsigned i; |
143 | int status = 0; | 143 | int status = 0; |
@@ -155,13 +155,12 @@ static int __ref serial_bind_config(struct usb_configuration *c) | |||
155 | 155 | ||
156 | static struct usb_configuration serial_config_driver = { | 156 | static struct usb_configuration serial_config_driver = { |
157 | /* .label = f(use_acm) */ | 157 | /* .label = f(use_acm) */ |
158 | .bind = serial_bind_config, | ||
159 | /* .bConfigurationValue = f(use_acm) */ | 158 | /* .bConfigurationValue = f(use_acm) */ |
160 | /* .iConfiguration = DYNAMIC */ | 159 | /* .iConfiguration = DYNAMIC */ |
161 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, | 160 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, |
162 | }; | 161 | }; |
163 | 162 | ||
164 | static int __ref gs_bind(struct usb_composite_dev *cdev) | 163 | static int __init gs_bind(struct usb_composite_dev *cdev) |
165 | { | 164 | { |
166 | int gcnum; | 165 | int gcnum; |
167 | struct usb_gadget *gadget = cdev->gadget; | 166 | struct usb_gadget *gadget = cdev->gadget; |
@@ -225,7 +224,8 @@ static int __ref gs_bind(struct usb_composite_dev *cdev) | |||
225 | } | 224 | } |
226 | 225 | ||
227 | /* register our configuration */ | 226 | /* register our configuration */ |
228 | status = usb_add_config(cdev, &serial_config_driver); | 227 | status = usb_add_config(cdev, &serial_config_driver, |
228 | serial_bind_config); | ||
229 | if (status < 0) | 229 | if (status < 0) |
230 | goto fail; | 230 | goto fail; |
231 | 231 | ||
@@ -242,7 +242,6 @@ static struct usb_composite_driver gserial_driver = { | |||
242 | .name = "g_serial", | 242 | .name = "g_serial", |
243 | .dev = &device_desc, | 243 | .dev = &device_desc, |
244 | .strings = dev_strings, | 244 | .strings = dev_strings, |
245 | .bind = gs_bind, | ||
246 | }; | 245 | }; |
247 | 246 | ||
248 | static int __init init(void) | 247 | static int __init init(void) |
@@ -271,7 +270,7 @@ static int __init init(void) | |||
271 | } | 270 | } |
272 | strings_dev[STRING_DESCRIPTION_IDX].s = serial_config_driver.label; | 271 | strings_dev[STRING_DESCRIPTION_IDX].s = serial_config_driver.label; |
273 | 272 | ||
274 | return usb_composite_register(&gserial_driver); | 273 | return usb_composite_probe(&gserial_driver, gs_bind); |
275 | } | 274 | } |
276 | module_init(init); | 275 | module_init(init); |
277 | 276 | ||