diff options
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/usbhid/hid-tmff.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/hid/usbhid/hid-tmff.c b/drivers/hid/usbhid/hid-tmff.c index 69882a726e99..144578b1a00c 100644 --- a/drivers/hid/usbhid/hid-tmff.c +++ b/drivers/hid/usbhid/hid-tmff.c | |||
@@ -137,7 +137,8 @@ static int hid_tmff_play(struct input_dev *dev, void *data, struct ff_effect *ef | |||
137 | int hid_tmff_init(struct hid_device *hid) | 137 | int hid_tmff_init(struct hid_device *hid) |
138 | { | 138 | { |
139 | struct tmff_device *tmff; | 139 | struct tmff_device *tmff; |
140 | struct list_head *pos; | 140 | struct hid_report *report; |
141 | struct list_head *report_list; | ||
141 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | 142 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); |
142 | struct input_dev *input_dev = hidinput->input; | 143 | struct input_dev *input_dev = hidinput->input; |
143 | const signed short *ff_bits = ff_joystick; | 144 | const signed short *ff_bits = ff_joystick; |
@@ -149,8 +150,8 @@ int hid_tmff_init(struct hid_device *hid) | |||
149 | return -ENOMEM; | 150 | return -ENOMEM; |
150 | 151 | ||
151 | /* Find the report to use */ | 152 | /* Find the report to use */ |
152 | list_for_each(pos, &hid->report_enum[HID_OUTPUT_REPORT].report_list) { | 153 | report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; |
153 | struct hid_report *report = (struct hid_report *)pos; | 154 | list_for_each_entry(report, report_list, list) { |
154 | int fieldnum; | 155 | int fieldnum; |
155 | 156 | ||
156 | for (fieldnum = 0; fieldnum < report->maxfield; ++fieldnum) { | 157 | for (fieldnum = 0; fieldnum < report->maxfield; ++fieldnum) { |