aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-lg.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2012-10-01 08:37:51 -0400
committerJiri Kosina <jkosina@suse.cz>2012-10-01 08:37:51 -0400
commita3cbe10e474ac8c2c30a151a7812e15e4cfa2775 (patch)
treef245dd77a3dede97a80f8369d984334b56220752 /drivers/hid/hid-lg.c
parentfa2bd30159499f441125495ba8d9d57f646ea42a (diff)
parent86e6b77eb7cf9ca2e9c7092b4dfd588f0a3307b6 (diff)
Merge branch 'upstream' into for-linus
Conflicts: drivers/hid/usbhid/hid-quirks.c
Diffstat (limited to 'drivers/hid/hid-lg.c')
-rw-r--r--drivers/hid/hid-lg.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index afc4de389f81..a2f8e88b9fa2 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -5,7 +5,6 @@
5 * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz> 5 * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
6 * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc 6 * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
7 * Copyright (c) 2006-2007 Jiri Kosina 7 * Copyright (c) 2006-2007 Jiri Kosina
8 * Copyright (c) 2007 Paul Walmsley
9 * Copyright (c) 2008 Jiri Slaby 8 * Copyright (c) 2008 Jiri Slaby
10 * Copyright (c) 2010 Hendrik Iben 9 * Copyright (c) 2010 Hendrik Iben
11 */ 10 */
@@ -109,7 +108,7 @@ static __u8 dfp_rdesc_fixed[] = {
109static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc, 108static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
110 unsigned int *rsize) 109 unsigned int *rsize)
111{ 110{
112 struct lg_drv_data *drv_data = (struct lg_drv_data *)hid_get_drvdata(hdev); 111 struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
113 112
114 if ((drv_data->quirks & LG_RDESC) && *rsize >= 90 && rdesc[83] == 0x26 && 113 if ((drv_data->quirks & LG_RDESC) && *rsize >= 90 && rdesc[83] == 0x26 &&
115 rdesc[84] == 0x8c && rdesc[85] == 0x02) { 114 rdesc[84] == 0x8c && rdesc[85] == 0x02) {
@@ -278,7 +277,7 @@ static int lg_input_mapping(struct hid_device *hdev, struct hid_input *hi,
278 0, 0, 0, 0, 0,183,184,185,186,187, 277 0, 0, 0, 0, 0,183,184,185,186,187,
279 188,189,190,191,192,193,194, 0, 0, 0 278 188,189,190,191,192,193,194, 0, 0, 0
280 }; 279 };
281 struct lg_drv_data *drv_data = (struct lg_drv_data *)hid_get_drvdata(hdev); 280 struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
282 unsigned int hid = usage->hid; 281 unsigned int hid = usage->hid;
283 282
284 if (hdev->product == USB_DEVICE_ID_LOGITECH_RECEIVER && 283 if (hdev->product == USB_DEVICE_ID_LOGITECH_RECEIVER &&
@@ -319,7 +318,7 @@ static int lg_input_mapped(struct hid_device *hdev, struct hid_input *hi,
319 struct hid_field *field, struct hid_usage *usage, 318 struct hid_field *field, struct hid_usage *usage,
320 unsigned long **bit, int *max) 319 unsigned long **bit, int *max)
321{ 320{
322 struct lg_drv_data *drv_data = (struct lg_drv_data *)hid_get_drvdata(hdev); 321 struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
323 322
324 if ((drv_data->quirks & LG_BAD_RELATIVE_KEYS) && usage->type == EV_KEY && 323 if ((drv_data->quirks & LG_BAD_RELATIVE_KEYS) && usage->type == EV_KEY &&
325 (field->flags & HID_MAIN_ITEM_RELATIVE)) 324 (field->flags & HID_MAIN_ITEM_RELATIVE))
@@ -335,7 +334,7 @@ static int lg_input_mapped(struct hid_device *hdev, struct hid_input *hi,
335static int lg_event(struct hid_device *hdev, struct hid_field *field, 334static int lg_event(struct hid_device *hdev, struct hid_field *field,
336 struct hid_usage *usage, __s32 value) 335 struct hid_usage *usage, __s32 value)
337{ 336{
338 struct lg_drv_data *drv_data = (struct lg_drv_data *)hid_get_drvdata(hdev); 337 struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
339 338
340 if ((drv_data->quirks & LG_INVERT_HWHEEL) && usage->code == REL_HWHEEL) { 339 if ((drv_data->quirks & LG_INVERT_HWHEEL) && usage->code == REL_HWHEEL) {
341 input_event(field->hidinput->input, usage->type, usage->code, 340 input_event(field->hidinput->input, usage->type, usage->code,
@@ -419,7 +418,7 @@ err_free:
419 418
420static void lg_remove(struct hid_device *hdev) 419static void lg_remove(struct hid_device *hdev)
421{ 420{
422 struct lg_drv_data *drv_data = (struct lg_drv_data *)hid_get_drvdata(hdev); 421 struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
423 if (drv_data->quirks & LG_FF4) 422 if (drv_data->quirks & LG_FF4)
424 lg4ff_deinit(hdev); 423 lg4ff_deinit(hdev);
425 424