Skip to contentSkip to conversation

Trivial fix for hid-tmff driver

PATCH In review Zinx Verituse 2 participants 2 messages Apr 29, 2004 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Trivial fix for hid-tmff driver

Well, this has been a problem for quite some time due to a change in the list code way back when, and my mails don't seem to be getting through to Vojtech Pavlik, so here's the patch.. The problem may still exist in the other drivers..

Signature · 1 line
Zinx Verituse                                    http://zinx.xmms.org/
drivers/usb/input/hid-tmff.c +1 -1
diff -ru linux-2.6.5.orig/drivers/usb/input/hid-tmff.c linux-2.6.5/drivers/usb/input/hid-tmff.c
@@ -110,7 +110,7 @@
 {
 	struct tmff_device *private;
 	struct list_head *pos;
-	struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list);
+	struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list);
 
 	private = kmalloc(sizeof(struct tmff_device), GFP_KERNEL);
 	if (!private)
#1 lore raw
Quoted 4 lines · Zinx Verituse

Well, this has been a problem for quite some time due to a change in the list code way back when, and my mails don't seem to be getting through to Vojtech Pavlik, so here's the patch.. The problem may still exist in the other drivers..

I'll get it into my tree asap.

Quoted 16 lines
Signature · 4 lines
-- 
Zinx Verituse                                    http://zinx.xmms.org/

diff -ru linux-2.6.5.orig/drivers/usb/input/hid-tmff.c linux-2.6.5/drivers/usb/input/hid-tmff.c
drivers/usb/input/hid-tmff.c +1 -1
@@ -110,7 +110,7 @@
 {
 	struct tmff_device *private;
 	struct list_head *pos;
-	struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list);
+	struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list);
 
 	private = kmalloc(sizeof(struct tmff_device), GFP_KERNEL);
 	if (!private)
Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR