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-tmff.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-tmff.c')
-rw-r--r-- | drivers/usb/input/hid-tmff.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/input/hid-tmff.c b/drivers/usb/input/hid-tmff.c index 8f6a0a6f94a9..023fd5ac31c8 100644 --- a/drivers/usb/input/hid-tmff.c +++ b/drivers/usb/input/hid-tmff.c | |||
@@ -111,6 +111,7 @@ int hid_tmff_init(struct hid_device *hid) | |||
111 | struct tmff_device *private; | 111 | struct tmff_device *private; |
112 | struct list_head *pos; | 112 | struct list_head *pos; |
113 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | 113 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); |
114 | struct input_dev *input_dev = hidinput->input; | ||
114 | 115 | ||
115 | private = kmalloc(sizeof(struct tmff_device), GFP_KERNEL); | 116 | private = kmalloc(sizeof(struct tmff_device), GFP_KERNEL); |
116 | if (!private) | 117 | if (!private) |
@@ -155,7 +156,7 @@ int hid_tmff_init(struct hid_device *hid) | |||
155 | private->report = report; | 156 | private->report = report; |
156 | private->rumble = field; | 157 | private->rumble = field; |
157 | 158 | ||
158 | set_bit(FF_RUMBLE, hidinput->input.ffbit); | 159 | set_bit(FF_RUMBLE, input_dev->ffbit); |
159 | break; | 160 | break; |
160 | 161 | ||
161 | default: | 162 | default: |
@@ -164,11 +165,11 @@ int hid_tmff_init(struct hid_device *hid) | |||
164 | } | 165 | } |
165 | 166 | ||
166 | /* Fallthrough to here only when a valid usage is found */ | 167 | /* Fallthrough to here only when a valid usage is found */ |
167 | hidinput->input.upload_effect = hid_tmff_upload_effect; | 168 | input_dev->upload_effect = hid_tmff_upload_effect; |
168 | hidinput->input.flush = hid_tmff_flush; | 169 | input_dev->flush = hid_tmff_flush; |
169 | 170 | ||
170 | set_bit(EV_FF, hidinput->input.evbit); | 171 | set_bit(EV_FF, input_dev->evbit); |
171 | hidinput->input.ff_effects_max = TMFF_EFFECTS; | 172 | input_dev->ff_effects_max = TMFF_EFFECTS; |
172 | } | 173 | } |
173 | } | 174 | } |
174 | 175 | ||