]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
input: i8042 - add runtime check in x86's i8042_platform_init
authorFeng Tang <feng.tang@intel.com>
Wed, 7 Jul 2010 20:02:16 +0000 (13:02 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 8 Jul 2010 00:05:07 +0000 (17:05 -0700)
Then it will first check x86_platforms's i8042 detection result,
then go on with normal probe.

Signed-off-by: Feng Tang <feng.tang@intel.com>
LKML-Reference: <4c34dd482753bb8f1@agluck-desktop.sc.intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
drivers/input/serio/i8042-x86ia64io.h

index 6168469ad1a69167c5fe77c5ef4ce8afedbf4be7..81003c4739f4f32351566759b9225fdfb974a7b7 100644 (file)
@@ -7,6 +7,10 @@
  * the Free Software Foundation.
  */
 
+#ifdef CONFIG_X86
+#include <asm/x86_init.h>
+#endif
+
 /*
  * Names.
  */
@@ -840,6 +844,12 @@ static int __init i8042_platform_init(void)
 {
        int retval;
 
+#ifdef CONFIG_X86
+       /* Just return if pre-detection shows no i8042 controller exist */
+       if (!x86_platform.i8042_detect())
+               return -ENODEV;
+#endif
+
 /*
  * On ix86 platforms touching the i8042 data register region can do really
  * bad things. Because of this the region is always reserved on ix86 boxes.