mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] Re: pc_keyb.c #define kbd_controller_present()
@ 2002-12-09 21:29 Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2002-12-09 21:29 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Nat Ersoz, linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <1039019244.25141.34.camel@ersoz.et.myrio.com>]

end of thread, other threads:[~2002-12-09 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-09 21:29 [PATCH] Re: pc_keyb.c #define kbd_controller_present() Bjorn Helgaas
     [not found] <1039019244.25141.34.camel@ersoz.et.myrio.com>
2002-12-04 20:54 ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®