diff options
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-dell.c | 4 | ||||
-rw-r--r-- | drivers/hid/hid-logitech.c | 5 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/drivers/hid/hid-dell.c b/drivers/hid/hid-dell.c index 788faa6b6cac..98ee40e8751f 100644 --- a/drivers/hid/hid-dell.c +++ b/drivers/hid/hid-dell.c | |||
@@ -26,8 +26,6 @@ static int dell_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
26 | { | 26 | { |
27 | int ret; | 27 | int ret; |
28 | 28 | ||
29 | hdev->quirks |= HID_QUIRK_RESET_LEDS; | ||
30 | |||
31 | ret = hid_parse(hdev); | 29 | ret = hid_parse(hdev); |
32 | if (ret) { | 30 | if (ret) { |
33 | dev_err(&hdev->dev, "parse failed\n"); | 31 | dev_err(&hdev->dev, "parse failed\n"); |
@@ -40,6 +38,8 @@ static int dell_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
40 | goto err_free; | 38 | goto err_free; |
41 | } | 39 | } |
42 | 40 | ||
41 | usbhid_set_leds(hdev); | ||
42 | |||
43 | return 0; | 43 | return 0; |
44 | err_free: | 44 | err_free: |
45 | return ret; | 45 | return ret; |
diff --git a/drivers/hid/hid-logitech.c b/drivers/hid/hid-logitech.c index 732258241c05..df27f9aadf26 100644 --- a/drivers/hid/hid-logitech.c +++ b/drivers/hid/hid-logitech.c | |||
@@ -226,8 +226,6 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
226 | 226 | ||
227 | hid_set_drvdata(hdev, (void *)quirks); | 227 | hid_set_drvdata(hdev, (void *)quirks); |
228 | 228 | ||
229 | if (quirks & LG_RESET_LEDS) | ||
230 | hdev->quirks |= HID_QUIRK_RESET_LEDS; | ||
231 | if (quirks & LG_NOGET) | 229 | if (quirks & LG_NOGET) |
232 | hdev->quirks |= HID_QUIRK_NOGET; | 230 | hdev->quirks |= HID_QUIRK_NOGET; |
233 | 231 | ||
@@ -243,6 +241,9 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
243 | goto err_free; | 241 | goto err_free; |
244 | } | 242 | } |
245 | 243 | ||
244 | if (quirks & LG_RESET_LEDS) | ||
245 | usbhid_set_leds(hdev); | ||
246 | |||
246 | return 0; | 247 | return 0; |
247 | err_free: | 248 | err_free: |
248 | return ret; | 249 | return ret; |
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 0513b60728d3..402ace751271 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -591,7 +591,7 @@ static int hid_find_field_early(struct hid_device *hid, unsigned int page, | |||
591 | return -1; | 591 | return -1; |
592 | } | 592 | } |
593 | 593 | ||
594 | static void usbhid_set_leds(struct hid_device *hid) | 594 | void usbhid_set_leds(struct hid_device *hid) |
595 | { | 595 | { |
596 | struct hid_field *field; | 596 | struct hid_field *field; |
597 | int offset; | 597 | int offset; |
@@ -601,6 +601,7 @@ static void usbhid_set_leds(struct hid_device *hid) | |||
601 | usbhid_submit_report(hid, field->report, USB_DIR_OUT); | 601 | usbhid_submit_report(hid, field->report, USB_DIR_OUT); |
602 | } | 602 | } |
603 | } | 603 | } |
604 | EXPORT_SYMBOL_GPL(usbhid_set_leds); | ||
604 | 605 | ||
605 | /* | 606 | /* |
606 | * Traverse the supplied list of reports and find the longest | 607 | * Traverse the supplied list of reports and find the longest |
@@ -860,9 +861,6 @@ static int usbhid_start(struct hid_device *hid) | |||
860 | usbhid_init_reports(hid); | 861 | usbhid_init_reports(hid); |
861 | hid_dump_device(hid); | 862 | hid_dump_device(hid); |
862 | 863 | ||
863 | if (hid->quirks & HID_QUIRK_RESET_LEDS) | ||
864 | usbhid_set_leds(hid); | ||
865 | |||
866 | return 0; | 864 | return 0; |
867 | 865 | ||
868 | fail: | 866 | fail: |