diff options
Diffstat (limited to 'drivers/usb/core')
| -rw-r--r-- | drivers/usb/core/generic.c | 9 | ||||
| -rw-r--r-- | drivers/usb/core/ledtrig-usbport.c | 17 | ||||
| -rw-r--r-- | drivers/usb/core/quirks.c | 3 |
3 files changed, 18 insertions, 11 deletions
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index 356b05c82dbc..f713cecc1f41 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c | |||
| @@ -143,9 +143,12 @@ int usb_choose_configuration(struct usb_device *udev) | |||
| 143 | continue; | 143 | continue; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | if (i > 0 && desc && is_audio(desc) && is_uac3_config(desc)) { | 146 | if (i > 0 && desc && is_audio(desc)) { |
| 147 | best = c; | 147 | if (is_uac3_config(desc)) { |
| 148 | break; | 148 | best = c; |
| 149 | break; | ||
| 150 | } | ||
| 151 | continue; | ||
| 149 | } | 152 | } |
| 150 | 153 | ||
| 151 | /* From the remaining configs, choose the first one whose | 154 | /* From the remaining configs, choose the first one whose |
diff --git a/drivers/usb/core/ledtrig-usbport.c b/drivers/usb/core/ledtrig-usbport.c index dc7f7fd71684..c12ac56606c3 100644 --- a/drivers/usb/core/ledtrig-usbport.c +++ b/drivers/usb/core/ledtrig-usbport.c | |||
| @@ -119,11 +119,6 @@ static const struct attribute_group ports_group = { | |||
| 119 | .attrs = ports_attrs, | 119 | .attrs = ports_attrs, |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | static const struct attribute_group *ports_groups[] = { | ||
| 123 | &ports_group, | ||
| 124 | NULL | ||
| 125 | }; | ||
| 126 | |||
| 127 | /*************************************** | 122 | /*************************************** |
| 128 | * Adding & removing ports | 123 | * Adding & removing ports |
| 129 | ***************************************/ | 124 | ***************************************/ |
| @@ -307,6 +302,7 @@ static int usbport_trig_notify(struct notifier_block *nb, unsigned long action, | |||
| 307 | static int usbport_trig_activate(struct led_classdev *led_cdev) | 302 | static int usbport_trig_activate(struct led_classdev *led_cdev) |
| 308 | { | 303 | { |
| 309 | struct usbport_trig_data *usbport_data; | 304 | struct usbport_trig_data *usbport_data; |
| 305 | int err; | ||
| 310 | 306 | ||
| 311 | usbport_data = kzalloc(sizeof(*usbport_data), GFP_KERNEL); | 307 | usbport_data = kzalloc(sizeof(*usbport_data), GFP_KERNEL); |
| 312 | if (!usbport_data) | 308 | if (!usbport_data) |
| @@ -315,6 +311,9 @@ static int usbport_trig_activate(struct led_classdev *led_cdev) | |||
| 315 | 311 | ||
| 316 | /* List of ports */ | 312 | /* List of ports */ |
| 317 | INIT_LIST_HEAD(&usbport_data->ports); | 313 | INIT_LIST_HEAD(&usbport_data->ports); |
| 314 | err = sysfs_create_group(&led_cdev->dev->kobj, &ports_group); | ||
| 315 | if (err) | ||
| 316 | goto err_free; | ||
| 318 | usb_for_each_dev(usbport_data, usbport_trig_add_usb_dev_ports); | 317 | usb_for_each_dev(usbport_data, usbport_trig_add_usb_dev_ports); |
| 319 | usbport_trig_update_count(usbport_data); | 318 | usbport_trig_update_count(usbport_data); |
| 320 | 319 | ||
| @@ -322,8 +321,11 @@ static int usbport_trig_activate(struct led_classdev *led_cdev) | |||
| 322 | usbport_data->nb.notifier_call = usbport_trig_notify; | 321 | usbport_data->nb.notifier_call = usbport_trig_notify; |
| 323 | led_set_trigger_data(led_cdev, usbport_data); | 322 | led_set_trigger_data(led_cdev, usbport_data); |
| 324 | usb_register_notify(&usbport_data->nb); | 323 | usb_register_notify(&usbport_data->nb); |
| 325 | |||
| 326 | return 0; | 324 | return 0; |
| 325 | |||
| 326 | err_free: | ||
| 327 | kfree(usbport_data); | ||
| 328 | return err; | ||
| 327 | } | 329 | } |
| 328 | 330 | ||
| 329 | static void usbport_trig_deactivate(struct led_classdev *led_cdev) | 331 | static void usbport_trig_deactivate(struct led_classdev *led_cdev) |
| @@ -335,6 +337,8 @@ static void usbport_trig_deactivate(struct led_classdev *led_cdev) | |||
| 335 | usbport_trig_remove_port(usbport_data, port); | 337 | usbport_trig_remove_port(usbport_data, port); |
| 336 | } | 338 | } |
| 337 | 339 | ||
| 340 | sysfs_remove_group(&led_cdev->dev->kobj, &ports_group); | ||
| 341 | |||
| 338 | usb_unregister_notify(&usbport_data->nb); | 342 | usb_unregister_notify(&usbport_data->nb); |
| 339 | 343 | ||
| 340 | kfree(usbport_data); | 344 | kfree(usbport_data); |
| @@ -344,7 +348,6 @@ static struct led_trigger usbport_led_trigger = { | |||
| 344 | .name = "usbport", | 348 | .name = "usbport", |
| 345 | .activate = usbport_trig_activate, | 349 | .activate = usbport_trig_activate, |
| 346 | .deactivate = usbport_trig_deactivate, | 350 | .deactivate = usbport_trig_deactivate, |
| 347 | .groups = ports_groups, | ||
| 348 | }; | 351 | }; |
| 349 | 352 | ||
| 350 | static int __init usbport_trig_init(void) | 353 | static int __init usbport_trig_init(void) |
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 514c5214ddb2..8bc35d53408b 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c | |||
| @@ -394,7 +394,8 @@ static const struct usb_device_id usb_quirk_list[] = { | |||
| 394 | { USB_DEVICE(0x1a40, 0x0101), .driver_info = USB_QUIRK_HUB_SLOW_RESET }, | 394 | { USB_DEVICE(0x1a40, 0x0101), .driver_info = USB_QUIRK_HUB_SLOW_RESET }, |
| 395 | 395 | ||
| 396 | /* Corsair K70 RGB */ | 396 | /* Corsair K70 RGB */ |
| 397 | { USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT }, | 397 | { USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT | |
| 398 | USB_QUIRK_DELAY_CTRL_MSG }, | ||
| 398 | 399 | ||
| 399 | /* Corsair Strafe */ | 400 | /* Corsair Strafe */ |
| 400 | { USB_DEVICE(0x1b1c, 0x1b15), .driver_info = USB_QUIRK_DELAY_INIT | | 401 | { USB_DEVICE(0x1b1c, 0x1b15), .driver_info = USB_QUIRK_DELAY_INIT | |
