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/pid.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/pid.c')
-rw-r--r-- | drivers/usb/input/pid.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c index acc71ec560e9..a00672c96644 100644 --- a/drivers/usb/input/pid.c +++ b/drivers/usb/input/pid.c | |||
@@ -262,6 +262,7 @@ int hid_pid_init(struct hid_device *hid) | |||
262 | { | 262 | { |
263 | struct hid_ff_pid *private; | 263 | struct hid_ff_pid *private; |
264 | struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list); | 264 | struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list); |
265 | struct input_dev *input_dev = hidinput->input; | ||
265 | 266 | ||
266 | private = hid->ff_private = kzalloc(sizeof(struct hid_ff_pid), GFP_KERNEL); | 267 | private = hid->ff_private = kzalloc(sizeof(struct hid_ff_pid), GFP_KERNEL); |
267 | if (!private) | 268 | if (!private) |
@@ -281,11 +282,12 @@ int hid_pid_init(struct hid_device *hid) | |||
281 | usb_fill_control_urb(private->urbffout, hid->dev, 0, | 282 | usb_fill_control_urb(private->urbffout, hid->dev, 0, |
282 | (void *)&private->ffcr, private->ctrl_buffer, 8, | 283 | (void *)&private->ffcr, private->ctrl_buffer, 8, |
283 | hid_pid_ctrl_out, hid); | 284 | hid_pid_ctrl_out, hid); |
284 | hidinput->input.upload_effect = hid_pid_upload_effect; | 285 | |
285 | hidinput->input.flush = hid_pid_flush; | 286 | input_dev->upload_effect = hid_pid_upload_effect; |
286 | hidinput->input.ff_effects_max = 8; // A random default | 287 | input_dev->flush = hid_pid_flush; |
287 | set_bit(EV_FF, hidinput->input.evbit); | 288 | input_dev->ff_effects_max = 8; // A random default |
288 | set_bit(EV_FF_STATUS, hidinput->input.evbit); | 289 | set_bit(EV_FF, input_dev->evbit); |
290 | set_bit(EV_FF_STATUS, input_dev->evbit); | ||
289 | 291 | ||
290 | spin_lock_init(&private->lock); | 292 | spin_lock_init(&private->lock); |
291 | 293 | ||