Commit 9b7bd673 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] input: atkbd option parsing

From: Dmitry Torokhov <dtor_core@ameritech.net>

Convert atkbd to the new style of option parsing.

If compiled as a module new option names are: set, softrepeat, reset.

If built into the kernel options must be prepended with "atkbd." prefix,
like "atkbd.softrepeat"
parent a03c40a3
...@@ -153,10 +153,11 @@ running once the system is up. ...@@ -153,10 +153,11 @@ running once the system is up.
atascsi= [HW,SCSI] Atari SCSI atascsi= [HW,SCSI] Atari SCSI
atkbd_set= [HW] Select keyboard code set atkbd.set= [HW] Select keyboard code set
Format: <int> Format: <int>
atkbd.softrepeat=
atkbd_reset [HW] Reset keyboard during initialization [HW] Use software keyboard repeat
atkbd.reset= [HW] Reset keyboard during initialization
autotest [IA64] autotest [IA64]
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -35,6 +36,8 @@ MODULE_PARM(atkbd_softrepeat, "1i"); ...@@ -35,6 +36,8 @@ MODULE_PARM(atkbd_softrepeat, "1i");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static int atkbd_set = 2; static int atkbd_set = 2;
module_param_named(set, atkbd_set, int, 0);
MODULE_PARM_DESC(set, "Select keyboard code set (2 = default, 3, 4)");
#if defined(__i386__) || defined (__x86_64__) #if defined(__i386__) || defined (__x86_64__)
static int atkbd_reset; static int atkbd_reset;
#else #else
...@@ -42,6 +45,13 @@ static int atkbd_reset = 1; ...@@ -42,6 +45,13 @@ static int atkbd_reset = 1;
#endif #endif
static int atkbd_softrepeat; static int atkbd_softrepeat;
module_param_named(reset, atkbd_reset, bool, 0);
MODULE_PARM_DESC(reset, "Reset keyboard during initialization");
static int atkbd_softrepeat;
module_param_named(softrepeat, atkbd_softrepeat, bool, 0);
MODULE_PARM_DESC(softrepeat, "Use software keyboard repeat");
/* /*
* Scancode to keycode tables. These are just the default setting, and * Scancode to keycode tables. These are just the default setting, and
* are loadable via an userland utility. * are loadable via an userland utility.
...@@ -760,34 +770,6 @@ static struct serio_dev atkbd_dev = { ...@@ -760,34 +770,6 @@ static struct serio_dev atkbd_dev = {
.cleanup = atkbd_cleanup, .cleanup = atkbd_cleanup,
}; };
#ifndef MODULE
static int __init atkbd_setup_set(char *str)
{
int ints[4];
str = get_options(str, ARRAY_SIZE(ints), ints);
if (ints[0] > 0) atkbd_set = ints[1];
return 1;
}
static int __init atkbd_setup_reset(char *str)
{
int ints[4];
str = get_options(str, ARRAY_SIZE(ints), ints);
if (ints[0] > 0) atkbd_reset = ints[1];
return 1;
}
static int __init atkbd_setup_softrepeat(char *str)
{
int ints[4];
str = get_options(str, ARRAY_SIZE(ints), ints);
if (ints[0] > 0) atkbd_softrepeat = ints[1];
return 1;
}
__setup("atkbd_set=", atkbd_setup_set);
__setup("atkbd_reset", atkbd_setup_reset);
__setup("atkbd_softrepeat=", atkbd_setup_softrepeat);
#endif
int __init atkbd_init(void) int __init atkbd_init(void)
{ {
serio_register_device(&atkbd_dev); serio_register_device(&atkbd_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment