patch-2.3.18 linux/include/asm-ppc/keyboard.h

Next file: linux/include/asm-ppc/machdep.h
Previous file: linux/include/asm-ppc/init.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.17/linux/include/asm-ppc/keyboard.h linux/include/asm-ppc/keyboard.h
@@ -28,33 +28,47 @@
 
 static inline int kbd_setkeycode(unsigned int scancode, unsigned int keycode)
 {
-	return ppc_md.kbd_setkeycode(scancode, keycode);
+	if ( ppc_md.kbd_setkeycode )
+		return ppc_md.kbd_setkeycode(scancode, keycode);
+	else
+		return 0;
 }
   
 static inline int kbd_getkeycode(unsigned int scancode)
 {
-	return ppc_md.kbd_getkeycode(scancode);
+	if ( ppc_md.kbd_getkeycode )
+		return ppc_md.kbd_getkeycode(scancode);
+	else
+		return 0;
 }
   
 static inline int kbd_translate(unsigned char keycode, unsigned char *keycodep,
 				char raw_mode)
 {
-	return ppc_md.kbd_translate(keycode, keycodep, raw_mode);
+	if ( ppc_md.kbd_translate )
+		return ppc_md.kbd_translate(keycode, keycodep, raw_mode);
+	else
+		return 0;
 }
   
 static inline int kbd_unexpected_up(unsigned char keycode)
 {
-	return ppc_md.kbd_unexpected_up(keycode);
+	if ( ppc_md.kbd_unexpected_up )
+		return ppc_md.kbd_unexpected_up(keycode);
+	else
+		return 0;
 }
   
 static inline void kbd_leds(unsigned char leds)
 {
-	ppc_md.kbd_leds(leds);
+	if ( ppc_md.kbd_leds )
+		ppc_md.kbd_leds(leds);
 }
   
 static inline void kbd_init_hw(void)
 {
-	ppc_md.kbd_init_hw();
+	if ( ppc_md.kbd_init_hw )
+		ppc_md.kbd_init_hw();
 }
 
 #define kbd_sysrq_xlate	(ppc_md.ppc_kbd_sysrq_xlate)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)