diff options
Diffstat (limited to 'drivers/usb/gadget/hid.c')
-rw-r--r-- | drivers/usb/gadget/hid.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c index 735495bf8411..2523e54097bd 100644 --- a/drivers/usb/gadget/hid.c +++ b/drivers/usb/gadget/hid.c | |||
@@ -127,7 +127,7 @@ static struct usb_gadget_strings *dev_strings[] = { | |||
127 | 127 | ||
128 | /****************************** Configurations ******************************/ | 128 | /****************************** Configurations ******************************/ |
129 | 129 | ||
130 | static int __ref do_config(struct usb_configuration *c) | 130 | static int __init do_config(struct usb_configuration *c) |
131 | { | 131 | { |
132 | struct hidg_func_node *e; | 132 | struct hidg_func_node *e; |
133 | int func = 0, status = 0; | 133 | int func = 0, status = 0; |
@@ -148,7 +148,6 @@ static int __ref do_config(struct usb_configuration *c) | |||
148 | 148 | ||
149 | static struct usb_configuration config_driver = { | 149 | static struct usb_configuration config_driver = { |
150 | .label = "HID Gadget", | 150 | .label = "HID Gadget", |
151 | .bind = do_config, | ||
152 | .bConfigurationValue = 1, | 151 | .bConfigurationValue = 1, |
153 | /* .iConfiguration = DYNAMIC */ | 152 | /* .iConfiguration = DYNAMIC */ |
154 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, | 153 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, |
@@ -156,7 +155,7 @@ static struct usb_configuration config_driver = { | |||
156 | 155 | ||
157 | /****************************** Gadget Bind ******************************/ | 156 | /****************************** Gadget Bind ******************************/ |
158 | 157 | ||
159 | static int __ref hid_bind(struct usb_composite_dev *cdev) | 158 | static int __init hid_bind(struct usb_composite_dev *cdev) |
160 | { | 159 | { |
161 | struct usb_gadget *gadget = cdev->gadget; | 160 | struct usb_gadget *gadget = cdev->gadget; |
162 | struct list_head *tmp; | 161 | struct list_head *tmp; |
@@ -201,7 +200,7 @@ static int __ref hid_bind(struct usb_composite_dev *cdev) | |||
201 | device_desc.iProduct = status; | 200 | device_desc.iProduct = status; |
202 | 201 | ||
203 | /* register our configuration */ | 202 | /* register our configuration */ |
204 | status = usb_add_config(cdev, &config_driver); | 203 | status = usb_add_config(cdev, &config_driver, do_config); |
205 | if (status < 0) | 204 | if (status < 0) |
206 | return status; | 205 | return status; |
207 | 206 | ||
@@ -256,7 +255,6 @@ static struct usb_composite_driver hidg_driver = { | |||
256 | .name = "g_hid", | 255 | .name = "g_hid", |
257 | .dev = &device_desc, | 256 | .dev = &device_desc, |
258 | .strings = dev_strings, | 257 | .strings = dev_strings, |
259 | .bind = hid_bind, | ||
260 | .unbind = __exit_p(hid_unbind), | 258 | .unbind = __exit_p(hid_unbind), |
261 | }; | 259 | }; |
262 | 260 | ||
@@ -282,7 +280,7 @@ static int __init hidg_init(void) | |||
282 | if (status < 0) | 280 | if (status < 0) |
283 | return status; | 281 | return status; |
284 | 282 | ||
285 | status = usb_composite_register(&hidg_driver); | 283 | status = usb_composite_probe(&hidg_driver, hid_bind); |
286 | if (status < 0) | 284 | if (status < 0) |
287 | platform_driver_unregister(&hidg_plat_driver); | 285 | platform_driver_unregister(&hidg_plat_driver); |
288 | 286 | ||