Skip to contentSkip to conversation

Fix drivers/macintosh/adbhid.c stupid breakage

PATCH Paul Mackerras 2 participants 2 messages Oct 31, 2005 Linux for power macintosh

lore
Share & tools
lore
#0 lore raw

Commit c7f7a569d9b4ea7c53ab6fcd1377895312d8372b ("[PATCH] Input:
convert drivers/macintosh to dynamic input_dev allocation") breaks any machine with an ADB keyboard or mouse, which includes my G4 powerbook. Was it given any testing at all?

The problem is that adbhid[]->input is NULL, so the kernel oopses with a null pointer dereference as soon as I press a key. The following patch fixes it.

---

drivers/macintosh/adbhid.c +1 -0
diff -urN powerpc-merge/drivers/macintosh/adbhid.c merge-hack/drivers/macintosh/adbhid.c
@@ -723,6 +723,7 @@
 
 	sprintf(hid->phys, "adb%d:%d.%02x/input", id, default_id, original_handler_id);
 
+	hid->input = input_dev;
 	hid->id = default_id;
 	hid->original_handler_id = original_handler_id;
 	hid->current_handler_id = current_handler_id;
#1 lore raw
Quoted 5 lines · Paul Mackerras

Commit c7f7a569d9b4ea7c53ab6fcd1377895312d8372b ("[PATCH] Input:
convert drivers/macintosh to dynamic input_dev allocation") breaks any machine with an ADB keyboard or mouse, which includes my G4 powerbook. Was it given any testing at all?

No it wasn't because I only have x86 to test with. HOwever it was in -mm tree for a while...

Sorry about the breakage.

Signature · 1 line
Dmitry