Messages in this thread | | | From | Bjorn Helgaas <> | Subject | Re: [PATCH] Re: pc_keyb.c #define kbd_controller_present() | Date | Mon, 9 Dec 2002 14:29:35 -0700 |
| |
You should only need this:
+#ifndef CONFIG_PSKEYBOARD +#define kbd_controller_present() 0 +#endif
I think the following hunk should be superfluous:
+#ifdef CONFIG_PSKEYBOARD #define kbd_read_input() inb(KBD_DATA_REG) #define kbd_read_status() inb(KBD_STATUS_REG) #define kbd_write_output(val) outb(val, KBD_DATA_REG) #define kbd_write_command(val) outb(val, KBD_CNTL_REG) +#else +#define kbd_read_input() 0 +#define kbd_read_status() 0 +#define kbd_write_output(val) +#define kbd_write_command(val) +#endif
Or is there some case where pc_keyb will use kbd_read_input() and friends even if kbd_controller_present() is false?
We have the equivalent of the first hunk in asm-ia64/keyboard.h, and the kbd_controller_present() hook should be used consistently to avoid breakage. For example, if you include the second hunk, and pc_keyb.c changes to use kbd_read_input() even when kbd_controller_present() is false, i386 might still work but ia64 would break.
Bjorn
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |