aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/serio/i8042-x86ia64io.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-09-04 01:41:38 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2005-09-04 01:41:38 -0500
commit8d5987a6e17fa36776a0c9964db0f24c3d070862 (patch)
treefcabd9919c13d7d7eb3b77b09de852488ab7d13d /drivers/input/serio/i8042-x86ia64io.h
parent0854e52d86080c1043bc8988daef2ebda4775f64 (diff)
Input: make i8042_platform_init return 'real' error code
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio/i8042-x86ia64io.h')
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 03877c84e6f..02bc23142ce 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -256,7 +256,7 @@ static void i8042_pnp_exit(void)
}
}
-static int i8042_pnp_init(void)
+static int __init i8042_pnp_init(void)
{
int result_kbd, result_aux;
@@ -322,25 +322,29 @@ static int i8042_pnp_init(void)
return 0;
}
+#else
+static inline int i8042_pnp_init(void) { return 0; }
+static inline void i8042_pnp_exit(void) { }
#endif
-static inline int i8042_platform_init(void)
+static int __init i8042_platform_init(void)
{
+ int retval;
+
/*
* 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.
*
* if (!request_region(I8042_DATA_REG, 16, "i8042"))
- * return -1;
+ * return -EBUSY;
*/
i8042_kbd_irq = I8042_MAP_IRQ(1);
i8042_aux_irq = I8042_MAP_IRQ(12);
-#ifdef CONFIG_PNP
- if (i8042_pnp_init())
- return -1;
-#endif
+ retval = i8042_pnp_init();
+ if (retval)
+ return retval;
#if defined(__ia64__)
i8042_reset = 1;
@@ -354,14 +358,12 @@ static inline int i8042_platform_init(void)
i8042_nomux = 1;
#endif
- return 0;
+ return retval;
}
static inline void i8042_platform_exit(void)
{
-#ifdef CONFIG_PNP
i8042_pnp_exit();
-#endif
}
#endif /* _I8042_X86IA64IO_H */