summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/i8042.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-09-04 01:42:00 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2005-09-04 01:42:00 -0500
commit945ef0d428bc33c639e49d27fb8cc765adec3fdf (patch)
tree0bcd9222a42b61081015419276d6aaa731e3ee3b /drivers/input/serio/i8042.c
parentc3d31e7f9a94800ba895a081e143e79954f6c62f (diff)
downloadblackbird-op-linux-945ef0d428bc33c639e49d27fb8cc765adec3fdf.tar.gz
blackbird-op-linux-945ef0d428bc33c639e49d27fb8cc765adec3fdf.zip
Input: i8042 - add i8042.nokbd module option to allow supressing
creation of keyboard port. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio/i8042.c')
-rw-r--r--drivers/input/serio/i8042.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 2a76d08c4d3e..19ef35db342e 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -27,6 +27,10 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
MODULE_DESCRIPTION("i8042 keyboard and mouse controller driver");
MODULE_LICENSE("GPL");
+static unsigned int i8042_nokbd;
+module_param_named(nokbd, i8042_nokbd, bool, 0);
+MODULE_PARM_DESC(nokbd, "Do not probe or use KBD port.");
+
static unsigned int i8042_noaux;
module_param_named(noaux, i8042_noaux, bool, 0);
MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port.");
@@ -1058,7 +1062,7 @@ static int __init i8042_create_mux_port(int index)
static int __init i8042_init(void)
{
- int i;
+ int i, have_ports = 0;
int err;
dbg_init();
@@ -1100,11 +1104,20 @@ static int __init i8042_init(void)
if (err)
goto err_unregister_ports;
}
+ have_ports = 1;
}
- err = i8042_create_kbd_port();
- if (err)
- goto err_unregister_ports;
+ if (!i8042_nokbd) {
+ err = i8042_create_kbd_port();
+ if (err)
+ goto err_unregister_ports;
+ have_ports = 1;
+ }
+
+ if (!have_ports) {
+ err = -ENODEV;
+ goto err_unregister_device;
+ }
mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
@@ -1114,6 +1127,7 @@ static int __init i8042_init(void)
for (i = 0; i < I8042_NUM_PORTS; i++)
if (i8042_ports[i].serio)
serio_unregister_port(i8042_ports[i].serio);
+ err_unregister_device:
platform_device_unregister(i8042_platform_device);
err_unregister_driver:
driver_unregister(&i8042_driver);
OpenPOWER on IntegriCloud