Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114447
b: refs/heads/master
c: 6edfa8d
h: refs/heads/master
i:
  114445: e5d1b74
  114443: 4b1f0f7
  114439: febcd88
  114431: 7ac63b8
v: v3
  • Loading branch information
Jiri Slaby authored and Jiri Kosina committed Oct 14, 2008
1 parent e1773ce commit a38b5e9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93c10132a7ac160df3175b53f7ee857625412165
refs/heads/master: 6edfa8dc33803a49ad936ead9840e453bee6ca3b
4 changes: 2 additions & 2 deletions trunk/drivers/hid/hid-dell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/hid/hid-logitech.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/hid/usbhid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ struct hid_item {
#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

/*
Expand Down Expand Up @@ -756,6 +755,7 @@ extern void hid_generic_exit(void);
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);
Expand Down

0 comments on commit a38b5e9

Please sign in to comment.