aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-dell.c4
-rw-r--r--drivers/hid/hid-logitech.c5
-rw-r--r--drivers/hid/usbhid/hid-core.c6
3 files changed, 7 insertions, 8 deletions
diff --git a/drivers/hid/hid-dell.c b/drivers/hid/hid-dell.c
index 788faa6b6ca..98ee40e8751 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)
{
int ret;
- hdev->quirks |= HID_QUIRK_RESET_LEDS;
-
ret = hid_parse(hdev);
if (ret) {
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)
goto err_free;
}
+ usbhid_set_leds(hdev);
+
return 0;
err_free:
return ret;
diff --git a/drivers/hid/hid-logitech.c b/drivers/hid/hid-logitech.c
index 732258241c0..df27f9aadf2 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)
hid_set_drvdata(hdev, (void *)quirks);
- if (quirks & LG_RESET_LEDS)
- hdev->quirks |= HID_QUIRK_RESET_LEDS;
if (quirks & LG_NOGET)
hdev->quirks |= HID_QUIRK_NOGET;
@@ -243,6 +241,9 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
goto err_free;
}
+ if (quirks & LG_RESET_LEDS)
+ usbhid_set_leds(hdev);
+
return 0;
err_free:
return ret;
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 0513b60728d..402ace75127 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,
return -1;
}
-static void usbhid_set_leds(struct hid_device *hid)
+void usbhid_set_leds(struct hid_device *hid)
{
struct hid_field *field;
int offset;
@@ -601,6 +601,7 @@ static void usbhid_set_leds(struct hid_device *hid)
usbhid_submit_report(hid, field->report, USB_DIR_OUT);
}
}
+EXPORT_SYMBOL_GPL(usbhid_set_leds);
/*
* Traverse the supplied list of reports and find the longest
@@ -860,9 +861,6 @@ static int usbhid_start(struct hid_device *hid)
usbhid_init_reports(hid);
hid_dump_device(hid);
- if (hid->quirks & HID_QUIRK_RESET_LEDS)
- usbhid_set_leds(hid);
-
return 0;
fail: