Skip to contentSkip to conversation

Dell Latitude C600 suspend problem

DISCUSSION Pete Zaitcev 1 participant 1 message Oct 8, 2001 1 message not in the archive Char and misc drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 3 lines

From: Tim Stadelmann

In any case, here's the patch:

Looks good, but I'd prefer just a tiny bit better.

1. asm-i386 instead of asm in filenames
2. replace space with tabs - Arjan used xterm paste or something?
3. I hate too long lines

The root of the evil is that the declaration of an external was not in any header (because it would make a header dependent on pm.h, and for the benefit of some obscure broken BIOS), and sooner or later a mismatch happened.
Unfortunately, I see no good way to correct that.

-- Pete

arch/i386/kernel/dmi_scan.c +2 -3
diff -ur -X dontdiff linux-2.4.10/arch/i386/kernel/dmi_scan.c linux-2.4.10-e/arch/i386/kernel/dmi_scan.c
@@ -369,15 +369,14 @@
  * was disabled before the suspend. Linux gets terribly confused by that.
  */
 
-typedef void (pm_kbd_func) (void);
-extern pm_kbd_func *pm_kbd_request_override;
+extern pm_callback pm_kbd_request_override;
 
 static __init int broken_ps2_resume(struct dmi_blacklist *d)
 {
 #ifdef CONFIG_VT
 	if (pm_kbd_request_override == NULL)
 	{
-		pm_kbd_request_override = pckbd_pm_resume;
+		pm_kbd_request_override = pckbd_pm_callback;
 		printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround enabled.\n", d->ident);
 	}
 #endif	
drivers/char/keyboard.c +1 -3
diff -ur -X dontdiff linux-2.4.10/drivers/char/keyboard.c linux-2.4.10-e/drivers/char/keyboard.c
@@ -911,8 +911,6 @@
 EXPORT_SYMBOL(keyboard_tasklet);
 DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0);
 
-typedef void (pm_kbd_func) (void);
-
 pm_callback pm_kbd_request_override = NULL;
 
 int __init kbd_init(void)
@@ -937,7 +935,7 @@
 
 	tasklet_enable(&keyboard_tasklet);
 	tasklet_schedule(&keyboard_tasklet);
-	
+
 	pm_kbd = pm_register(PM_SYS_DEV, PM_SYS_KBC, pm_kbd_request_override);
 
 	return 0;
drivers/char/pc_keyb.c +23 -19

52 lines not on this page · raw message

include/asm-i386/keyboard.h +1 -1
diff -ur -X dontdiff linux-2.4.10/include/asm-i386/keyboard.h linux-2.4.10-e/include/asm-i386/keyboard.h
@@ -28,7 +28,7 @@
 extern char pckbd_unexpected_up(unsigned char keycode);
 extern void pckbd_leds(unsigned char leds);
 extern void pckbd_init_hw(void);
-extern void pckbd_pm_resume(void);
+extern int pckbd_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data);
 extern unsigned char pckbd_sysrq_xlate[128];
 
 #define kbd_setkeycode		pckbd_setkeycode