[PATCH v2 5/5] input: i8042 - add runtime check in x86's i8042_platform_init

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: feng.tang
Date: Monday, July 5, 2010 - 8:03 am

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>
---
 drivers/input/serio/i8042-x86ia64io.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 6168469..6228526 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -7,6 +7,8 @@
  * the Free Software Foundation.
  */
 
+#include <asm/x86_init.h>
+
 /*
  * Names.
  */
@@ -840,6 +842,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.
-- 
1.7.0.4

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v2 5/5] input: i8042 - add runtime check in x86's i ..., feng.tang, (Mon Jul 5, 8:03 am)
[tip:x86/urgent] x86, platform: Export x86_platform to modules, tip-bot for H. Peter ..., (Thu Jul 8, 12:15 am)
[tip:x86/urgent] x86: Add i8042 pre-detection hook to x86_ ..., tip-bot for Feng Tang, (Thu Jul 8, 12:16 am)
[tip:x86/urgent] x86, mrst: Add i8042_detect API for Moore ..., tip-bot for Feng Tang, (Thu Jul 8, 12:16 am)
[tip:x86/urgent] Revert &quot;Input: do not force selecting i80 ..., tip-bot for Feng Tang, (Thu Jul 8, 12:16 am)
[tip:x86/urgent] Revert &quot;Input: fixup X86_MRST selects&quot;, tip-bot for Feng Tang, (Thu Jul 8, 12:16 am)
[tip:x86/urgent] input: i8042 - add runtime check in x86's ..., tip-bot for Feng Tang, (Thu Jul 8, 12:17 am)