aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/i8042.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-09-04 02:42:00 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2005-09-04 02:42:00 -0400
commit945ef0d428bc33c639e49d27fb8cc765adec3fdf (patch)
tree0bcd9222a42b61081015419276d6aaa731e3ee3b /drivers/input/serio/i8042.c
parentc3d31e7f9a94800ba895a081e143e79954f6c62f (diff)
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>");
27MODULE_DESCRIPTION("i8042 keyboard and mouse controller driver"); 27MODULE_DESCRIPTION("i8042 keyboard and mouse controller driver");
28MODULE_LICENSE("GPL"); 28MODULE_LICENSE("GPL");
29 29
30static unsigned int i8042_nokbd;
31module_param_named(nokbd, i8042_nokbd, bool, 0);
32MODULE_PARM_DESC(nokbd, "Do not probe or use KBD port.");
33
30static unsigned int i8042_noaux; 34static unsigned int i8042_noaux;
31module_param_named(noaux, i8042_noaux, bool, 0); 35module_param_named(noaux, i8042_noaux, bool, 0);
32MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port."); 36MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port.");
@@ -1058,7 +1062,7 @@ static int __init i8042_create_mux_port(int index)
1058 1062
1059static int __init i8042_init(void) 1063static int __init i8042_init(void)
1060{ 1064{
1061 int i; 1065 int i, have_ports = 0;
1062 int err; 1066 int err;
1063 1067
1064 dbg_init(); 1068 dbg_init();
@@ -1100,11 +1104,20 @@ static int __init i8042_init(void)
1100 if (err) 1104 if (err)
1101 goto err_unregister_ports; 1105 goto err_unregister_ports;
1102 } 1106 }
1107 have_ports = 1;
1103 } 1108 }
1104 1109
1105 err = i8042_create_kbd_port(); 1110 if (!i8042_nokbd) {
1106 if (err) 1111 err = i8042_create_kbd_port();
1107 goto err_unregister_ports; 1112 if (err)
1113 goto err_unregister_ports;
1114 have_ports = 1;
1115 }
1116
1117 if (!have_ports) {
1118 err = -ENODEV;
1119 goto err_unregister_device;
1120 }
1108 1121
1109 mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD); 1122 mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
1110 1123
@@ -1114,6 +1127,7 @@ static int __init i8042_init(void)
1114 for (i = 0; i < I8042_NUM_PORTS; i++) 1127 for (i = 0; i < I8042_NUM_PORTS; i++)
1115 if (i8042_ports[i].serio) 1128 if (i8042_ports[i].serio)
1116 serio_unregister_port(i8042_ports[i].serio); 1129 serio_unregister_port(i8042_ports[i].serio);
1130 err_unregister_device:
1117 platform_device_unregister(i8042_platform_device); 1131 platform_device_unregister(i8042_platform_device);
1118 err_unregister_driver: 1132 err_unregister_driver:
1119 driver_unregister(&i8042_driver); 1133 driver_unregister(&i8042_driver);