Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323437
b: refs/heads/master
c: a80fe5d
h: refs/heads/master
i:
  323435: 03273cd
v: v3
  • Loading branch information
Michal Malý authored and Jiri Kosina committed Sep 25, 2012
1 parent eacc309 commit bca17e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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: a2063172ccafb5e7748a3b6719df8ac68ec89060
refs/heads/master: a80fe5d6e3190f65be8cc7efa487f187eb3dbffa
6 changes: 3 additions & 3 deletions trunk/drivers/hid/hid-lg.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
return -ENOMEM;
}
drv_data->quirks = id->driver_data;

hid_set_drvdata(hdev, (void *)drv_data);

if (drv_data->quirks & LG_NOGET)
Expand All @@ -383,7 +383,7 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
}

/* Setup wireless link with Logitech Wii wheel */
if(hdev->product == USB_DEVICE_ID_LOGITECH_WII_WHEEL) {
if (hdev->product == USB_DEVICE_ID_LOGITECH_WII_WHEEL) {
unsigned char buf[] = { 0x00, 0xAF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

ret = hdev->hid_output_raw_report(hdev, buf, sizeof(buf), HID_FEATURE_REPORT);
Expand Down Expand Up @@ -479,7 +479,7 @@ static const struct hid_device_id lg_devices[] = {
.driver_data = LG_NOGET | LG_FF4 },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL),
.driver_data = LG_FF4 },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WINGMAN_FFG ),
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WINGMAN_FFG),
.driver_data = LG_FF },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2),
.driver_data = LG_FF2 },
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/hid/hid-lg4ff.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static int hid_lg4ff_play(struct input_dev *dev, void *data, struct ff_effect *e
__s32 *value = report->field[0]->value;
int x;

#define CLAMP(x) if (x < 0) x = 0; if (x > 0xff) x = 0xff
#define CLAMP(x) do { if (x < 0) x = 0; else if (x > 0xff) x = 0xff; } while (0)

switch (effect->type) {
case FF_CONSTANT:
Expand Down Expand Up @@ -285,7 +285,7 @@ static void hid_lg4ff_set_range_dfp(struct hid_device *hid, __u16 range)

/* Prepare "coarse" limit command */
value[0] = 0xf8;
value[1] = 0x00; /* Set later */
value[1] = 0x00; /* Set later */
value[2] = 0x00;
value[3] = 0x00;
value[4] = 0x00;
Expand Down

0 comments on commit bca17e6

Please sign in to comment.