aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/hid-lgff.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/input/hid-lgff.c')
-rw-r--r--drivers/usb/input/hid-lgff.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/usb/input/hid-lgff.c b/drivers/usb/input/hid-lgff.c
index 0c4c77aa31ea..f82c9c9e5d51 100644
--- a/drivers/usb/input/hid-lgff.c
+++ b/drivers/usb/input/hid-lgff.c
@@ -255,22 +255,19 @@ static void hid_lgff_input_init(struct hid_device* hid)
255 u16 idVendor = le16_to_cpu(hid->dev->descriptor.idVendor); 255 u16 idVendor = le16_to_cpu(hid->dev->descriptor.idVendor);
256 u16 idProduct = le16_to_cpu(hid->dev->descriptor.idProduct); 256 u16 idProduct = le16_to_cpu(hid->dev->descriptor.idProduct);
257 struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); 257 struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list);
258 struct input_dev *input_dev = hidinput->input;
258 259
259 while (dev->idVendor && (idVendor != dev->idVendor || idProduct != dev->idProduct)) 260 while (dev->idVendor && (idVendor != dev->idVendor || idProduct != dev->idProduct))
260 dev++; 261 dev++;
261 262
262 ff = dev->ff; 263 for (ff = dev->ff; *ff >= 0; ff++)
264 set_bit(*ff, input_dev->ffbit);
263 265
264 while (*ff >= 0) { 266 input_dev->upload_effect = hid_lgff_upload_effect;
265 set_bit(*ff, hidinput->input.ffbit); 267 input_dev->flush = hid_lgff_flush;
266 ++ff;
267 }
268
269 hidinput->input.upload_effect = hid_lgff_upload_effect;
270 hidinput->input.flush = hid_lgff_flush;
271 268
272 set_bit(EV_FF, hidinput->input.evbit); 269 set_bit(EV_FF, input_dev->evbit);
273 hidinput->input.ff_effects_max = LGFF_EFFECTS; 270 input_dev->ff_effects_max = LGFF_EFFECTS;
274} 271}
275 272
276static void hid_lgff_exit(struct hid_device* hid) 273static void hid_lgff_exit(struct hid_device* hid)