summaryrefslogtreecommitdiff
path: root/drivers/input/tsdev.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-01-18 18:09:15 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2004-01-18 18:09:15 -0800
commitef02db51e3de045dcadba2ee399e6a9efbac9f1e (patch)
tree9dbf778798b59cce87cf13add2dd5505d18dc803 /drivers/input/tsdev.c
parent07a190a474f513464fea0d40ee853591c0b44d51 (diff)
[PATCH] Convert tsdev to use module_param
From: Dmitry Torokhov <dtor_core@ameritech.net> Convert tsdev to the new way of handling parameters and document them in kernel-parameters.txt
Diffstat (limited to 'drivers/input/tsdev.c')
-rw-r--r--drivers/input/tsdev.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c
index d2362bbf6615..679f42f81c6c 100644
--- a/drivers/input/tsdev.c
+++ b/drivers/input/tsdev.c
@@ -34,6 +34,7 @@
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/major.h>
@@ -51,6 +52,18 @@
#define CONFIG_INPUT_TSDEV_SCREEN_Y 320
#endif
+MODULE_AUTHOR("James Simmons <jsimmons@transvirtual.com>");
+MODULE_DESCRIPTION("Input driver to touchscreen converter");
+MODULE_LICENSE("GPL");
+
+static int xres = CONFIG_INPUT_TSDEV_SCREEN_X;
+module_param(xres, uint, 0);
+MODULE_PARM_DESC(xres, "Horizontal screen resolution");
+
+static int yres = CONFIG_INPUT_TSDEV_SCREEN_Y;
+module_param(yres, uint, 0);
+MODULE_PARM_DESC(yres, "Vertical screen resolution");
+
struct tsdev {
int exist;
int open;
@@ -82,9 +95,6 @@ static struct input_handler tsdev_handler;
static struct tsdev *tsdev_table[TSDEV_MINORS];
-static int xres = CONFIG_INPUT_TSDEV_SCREEN_X;
-static int yres = CONFIG_INPUT_TSDEV_SCREEN_Y;
-
static int tsdev_fasync(int fd, struct file *file, int on)
{
struct tsdev_list *list = file->private_data;
@@ -394,10 +404,3 @@ static void __exit tsdev_exit(void)
module_init(tsdev_init);
module_exit(tsdev_exit);
-
-MODULE_AUTHOR("James Simmons <jsimmons@transvirtual.com>");
-MODULE_DESCRIPTION("Input driver to touchscreen converter");
-MODULE_PARM(xres, "i");
-MODULE_PARM_DESC(xres, "Horizontal screen resolution");
-MODULE_PARM(yres, "i");
-MODULE_PARM_DESC(yres, "Vertical screen resolution");