Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 49097
b: refs/heads/master
c: 00a8691
h: refs/heads/master
i:
  49095: 355a469
v: v3
  • Loading branch information
Dmitry Torokhov committed Feb 18, 2007
1 parent 517afe7 commit 49be965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 130b1ab3f3dba350a949ae44a39c9beebddc09b9
refs/heads/master: 00a8691ca689c134eaf5b73d7251df1d6f0318be
10 changes: 6 additions & 4 deletions trunk/drivers/usb/input/hid-lgff.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ static const struct dev_type devices[] = {
{ 0x046d, 0xc294, ff_joystick },
{ 0x046d, 0xc295, ff_joystick },
{ 0x046d, 0xca03, ff_joystick },
{ 0x0000, 0x0000, ff_joystick }
};

static int hid_lgff_play(struct input_dev *dev, void *data, struct ff_effect *effect)
Expand Down Expand Up @@ -107,8 +106,9 @@ int hid_lgff_init(struct hid_device* hid)
struct input_dev *dev = hidinput->input;
struct hid_report *report;
struct hid_field *field;
const signed short *ff_bits = ff_joystick;
int error;
int i, j;
int i;

/* Find the report to use */
if (list_empty(report_list)) {
Expand All @@ -132,12 +132,14 @@ int hid_lgff_init(struct hid_device* hid)
for (i = 0; i < ARRAY_SIZE(devices); i++) {
if (dev->id.vendor == devices[i].idVendor &&
dev->id.product == devices[i].idProduct) {
for (j = 0; devices[i].ff[j] >= 0; j++)
set_bit(devices[i].ff[j], dev->ffbit);
ff_bits = devices[i].ff;
break;
}
}

for (i = 0; ff_bits[i] >= 0; i++)
set_bit(ff_bits[i], dev->ffbit);

error = input_ff_create_memless(dev, NULL, hid_lgff_play);
if (error)
return error;
Expand Down

0 comments on commit 49be965

Please sign in to comment.