lkml.org 
[lkml]   [2010]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH v2 5/5] input: i8042 - add runtime check in x86's i8042_platform_init
Date
From: Feng Tang <feng.tang@intel.com>

Then it will first check x86_platforms's i8042 detection result,
then go on with normal probe.

Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
Added #ifdef around #include <asm/x86_init.h> -- Tony

diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 6168469..81003c4 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -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.

\
 
 \ /
  Last update: 2010-07-07 22:05    [from the cache]
©2003-2011 Jasper Spaans