{
int ret;
- hdev->quirks |= HID_QUIRK_RESET_LEDS;
-
ret = hid_parse(hdev);
if (ret) {
dev_err(&hdev->dev, "parse failed\n");
goto err_free;
}
+ usbhid_set_leds(hdev);
+
return 0;
err_free:
return ret;
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;
goto err_free;
}
+ if (quirks & LG_RESET_LEDS)
+ usbhid_set_leds(hdev);
+
return 0;
err_free:
return ret;
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;
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
usbhid_init_reports(hid);
hid_dump_device(hid);
- if (hid->quirks & HID_QUIRK_RESET_LEDS)
- usbhid_set_leds(hid);
-
return 0;
fail:
#define HID_QUIRK_BADPAD 0x00000020
#define HID_QUIRK_MULTI_INPUT 0x00000040
#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
-#define HID_QUIRK_RESET_LEDS 0x00100000
#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
/*
u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct);
int usbhid_quirks_init(char **quirks_param);
void usbhid_quirks_exit(void);
+void usbhid_set_leds(struct hid_device *hid);
#ifdef CONFIG_HID_FF
int hid_ff_init(struct hid_device *hid);