diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-09-15 03:01:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 12:52:52 -0400 |
commit | c5b7c7c395a34f12cdf246d66c1feeff2933d584 (patch) | |
tree | 8af335c30bb92991f4bfd8251de4fed9907b07bd /drivers/usb/input/hid-lgff.c | |
parent | 3c42f0c3dde8feb59fc87df45cadb847d5511c0a (diff) |
[PATCH] drivers/usb/input: convert to dynamic input_dev allocation
Input: convert drivers/iusb/input to dynamic input_dev allocation
This is required for input_dev sysfs integration
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/input/hid-lgff.c')
-rw-r--r-- | drivers/usb/input/hid-lgff.c | 17 |
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 | ||
276 | static void hid_lgff_exit(struct hid_device* hid) | 273 | static void hid_lgff_exit(struct hid_device* hid) |