[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>
This commit is contained in:
Dmitry Torokhov
2005-09-15 02:01:47 -05:00
committed by Greg Kroah-Hartman
parent 3c42f0c3dd
commit c5b7c7c395
21 changed files with 988 additions and 1029 deletions

View File

@@ -262,6 +262,7 @@ int hid_pid_init(struct hid_device *hid)
{
struct hid_ff_pid *private;
struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list);
struct input_dev *input_dev = hidinput->input;
private = hid->ff_private = kzalloc(sizeof(struct hid_ff_pid), GFP_KERNEL);
if (!private)
@@ -281,11 +282,12 @@ int hid_pid_init(struct hid_device *hid)
usb_fill_control_urb(private->urbffout, hid->dev, 0,
(void *)&private->ffcr, private->ctrl_buffer, 8,
hid_pid_ctrl_out, hid);
hidinput->input.upload_effect = hid_pid_upload_effect;
hidinput->input.flush = hid_pid_flush;
hidinput->input.ff_effects_max = 8; // A random default
set_bit(EV_FF, hidinput->input.evbit);
set_bit(EV_FF_STATUS, hidinput->input.evbit);
input_dev->upload_effect = hid_pid_upload_effect;
input_dev->flush = hid_pid_flush;
input_dev->ff_effects_max = 8; // A random default
set_bit(EV_FF, input_dev->evbit);
set_bit(EV_FF_STATUS, input_dev->evbit);
spin_lock_init(&private->lock);