mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] Convert mouse drivers to use module_param
Date: Mon, 5 Jan 2004 01:02:48 -0500	[thread overview]
Message-ID: <200401050102.49892.dtor_core@ameritech.net> (raw)
In-Reply-To: <200401050101.20789.dtor_core@ameritech.net>

===================================================================


ChangeSet@1.1581, 2004-01-05 00:25:23-05:00, dtor_core@ameritech.net
  Input: convert the rest of mouse devices to the new way of
         handling kernel parameters and document them in
         kernel-parameters.txt


 Documentation/kernel-parameters.txt |   12 ++++++++++--
 drivers/input/mouse/98busmouse.c    |   17 ++++-------------
 drivers/input/mouse/inport.c        |   19 +++++--------------
 drivers/input/mouse/logibm.c        |   17 ++++-------------
 drivers/input/mousedev.c            |   17 +++++++++--------
 5 files changed, 32 insertions(+), 50 deletions(-)


===================================================================



diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt	Mon Jan  5 00:46:29 2004
+++ b/Documentation/kernel-parameters.txt	Mon Jan  5 00:46:29 2004
@@ -85,6 +85,9 @@
 			See header of drivers/scsi/53c7xx.c.
 			See also Documentation/scsi/ncr53c7xx.txt.
 
+	98busmouse.irq=	[HW,MOUSE] PC-9801 Bus Mouse Driver
+			Format: <irq>, default is 13
+
 	acpi=		[HW,ACPI] Advanced Configuration and Power Interface 
 			Format: { force | off | ht }
 			force -- enables ACPI for systems with default off
@@ -417,7 +420,7 @@
 
 	initrd=		[BOOT] Specify the location of the initial ramdisk
 
-	inport_irq=	[HW] Inport (ATI XL and Microsoft) busmouse driver
+	inport.irq=	[HW] Inport (ATI XL and Microsoft) busmouse driver
 			Format: <irq>
 
 	inttest=	[IA64]
@@ -465,7 +468,7 @@
 
 	lockd.tcpport=	[NFS]
 
-	logibm_irq=	[HW,MOUSE] Logitech Bus Mouse Driver
+	logibm.irq=	[HW,MOUSE] Logitech Bus Mouse Driver
 			Format: <irq>
 
 	log_buf_len=n	Sets the size of the printk ring buffer, in bytes.
@@ -564,6 +567,11 @@
 			See Documentation/video4linux/meye.txt.
 
 	mga=		[HW,DRM]
+
+	mousedev.xres	[MOUSE] Horizontal screen resolution, used for devices
+			reporting absolute coordinates, such as tablets
+	mousedev.yres	[MOUSE] Vertical screen resolution, used for devices
+			reporting absolute coordinates, such as tablets
 
 	mpu401=		[HW,OSS]
 			Format: <io>,<irq>
diff -Nru a/drivers/input/mouse/98busmouse.c b/drivers/input/mouse/98busmouse.c
--- a/drivers/input/mouse/98busmouse.c	Mon Jan  5 00:46:29 2004
+++ b/drivers/input/mouse/98busmouse.c	Mon Jan  5 00:46:29 2004
@@ -33,6 +33,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
@@ -69,9 +70,10 @@
 
 #define PC98BM_IRQ		13
 
-MODULE_PARM(pc98bm_irq, "i");
-
 static int pc98bm_irq = PC98BM_IRQ;
+module_param_named(irq, pc98bm_irq, uint, 0);
+MODULE_PARM_DESC(irq, "IRQ number (13=default)");
+
 static int pc98bm_used = 0;
 
 static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -140,17 +142,6 @@
 
 	return IRQ_HANDLED;
 }
-
-#ifndef MODULE
-static int __init pc98bm_setup(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) pc98bm_irq = ints[1];
-        return 1;
-}
-__setup("pc98bm_irq=", pc98bm_setup);
-#endif
 
 static int __init pc98bm_init(void)
 {
diff -Nru a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c
--- a/drivers/input/mouse/inport.c	Mon Jan  5 00:46:29 2004
+++ b/drivers/input/mouse/inport.c	Mon Jan  5 00:46:29 2004
@@ -35,6 +35,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/config.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
@@ -80,10 +81,11 @@
 
 #define INPORT_IRQ		5
 
-MODULE_PARM(inport_irq, "i");
-
 static int inport_irq = INPORT_IRQ;
-static int inport_used = 0;
+module_param_named(irq, inport_irq, uint, 0);
+MODULE_PARM_DESC(irq, "IRQ number (5=default)");
+
+static int inport_used;
 
 static irqreturn_t inport_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
@@ -152,17 +154,6 @@
 	input_sync(&inport_dev);
 	return IRQ_HANDLED;
 }
-
-#ifndef MODULE
-static int __init inport_setup(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) inport_irq = ints[1];
-        return 1;
-}
-__setup("inport_irq=", inport_setup);
-#endif
 
 static int __init inport_init(void)
 {
diff -Nru a/drivers/input/mouse/logibm.c b/drivers/input/mouse/logibm.c
--- a/drivers/input/mouse/logibm.c	Mon Jan  5 00:46:29 2004
+++ b/drivers/input/mouse/logibm.c	Mon Jan  5 00:46:29 2004
@@ -36,6 +36,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
@@ -70,9 +71,10 @@
 
 #define LOGIBM_IRQ		5
 
-MODULE_PARM(logibm_irq, "i");
-
 static int logibm_irq = LOGIBM_IRQ;
+module_param_named(irq, logibm_irq, uint, 0);
+MODULE_PARM_DESC(irq, "IRQ number (5=default)");
+
 static int logibm_used = 0;
 
 static irqreturn_t logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -141,17 +143,6 @@
 	outb(LOGIBM_ENABLE_IRQ, LOGIBM_CONTROL_PORT);
 	return IRQ_HANDLED;
 }
-
-#ifndef MODULE
-static int __init logibm_setup(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) logibm_irq = ints[1];
-        return 1;
-}
-__setup("logibm_irq=", logibm_setup);
-#endif
 
 static int __init logibm_init(void)
 {
diff -Nru a/drivers/input/mousedev.c b/drivers/input/mousedev.c
--- a/drivers/input/mousedev.c	Mon Jan  5 00:46:29 2004
+++ b/drivers/input/mousedev.c	Mon Jan  5 00:46:29 2004
@@ -15,6 +15,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/config.h>
@@ -38,6 +39,14 @@
 #define CONFIG_INPUT_MOUSEDEV_SCREEN_Y	768
 #endif
 
+static int xres = CONFIG_INPUT_MOUSEDEV_SCREEN_X;
+module_param(xres, uint, 0);
+MODULE_PARM_DESC(xres, "Horizontal screen resolution");
+
+static int yres = CONFIG_INPUT_MOUSEDEV_SCREEN_Y;
+module_param(yres, uint, 0);
+MODULE_PARM_DESC(yres, "Vertical screen resolution");
+
 struct mousedev {
 	int exist;
 	int open;
@@ -73,9 +82,6 @@
 static struct mousedev *mousedev_table[MOUSEDEV_MINORS];
 static struct mousedev mousedev_mix;
 
-static int xres = CONFIG_INPUT_MOUSEDEV_SCREEN_X;
-static int yres = CONFIG_INPUT_MOUSEDEV_SCREEN_Y;
-
 #define fx(i)  (list->old_x[(list->pkt_count - (i)) & 03])
 #define fy(i)  (list->old_y[(list->pkt_count - (i)) & 03])
 
@@ -582,8 +588,3 @@
 
 module_init(mousedev_init);
 module_exit(mousedev_exit);
-
-MODULE_PARM(xres, "i");
-MODULE_PARM_DESC(xres, "Horizontal screen resolution");
-MODULE_PARM(yres, "i");
-MODULE_PARM_DESC(yres, "Vertical screen resolution");

  reply	other threads:[~2004-01-05  6:07 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-03  8:50 New set of input patches Dmitry Torokhov
2004-01-03  8:56 ` [PATCH 1/7] i8042 suspend Dmitry Torokhov
2004-01-03  8:57   ` [PATCH 2/7] i8042 option parsing Dmitry Torokhov
2004-01-03  9:00     ` [PATCH 3/7] psmouse " Dmitry Torokhov
2004-01-03  9:01       ` [PATCH 4/7] atkbd " Dmitry Torokhov
2004-01-03  9:02         ` [PATCH 5/7] missing module licenses Dmitry Torokhov
2004-01-03  9:03           ` [PATCH 6/7] Kconfig Synaptics help Dmitry Torokhov
2004-01-03  9:03             ` [PATCH 7/7] SiS AUX port Dmitry Torokhov
2004-03-29 15:39             ` Dmitry Torokhov
2004-03-29 15:39           ` [PATCH 6/7] Kconfig Synaptics help Dmitry Torokhov
2004-03-29 15:39         ` [PATCH 5/7] missing module licenses Dmitry Torokhov
2004-01-03 10:07       ` [PATCH 3/7] psmouse option parsing Vojtech Pavlik
2004-01-03 17:29         ` Dmitry Torokhov
2004-01-03 17:38           ` Vojtech Pavlik
2004-03-29 15:40           ` Vojtech Pavlik
2004-03-29 15:40         ` Dmitry Torokhov
2004-03-29 15:39       ` [PATCH 4/7] atkbd " Dmitry Torokhov
2004-03-29 15:39       ` [PATCH 3/7] psmouse " Vojtech Pavlik
2004-03-29 15:39     ` Dmitry Torokhov
2004-01-03 10:03   ` [PATCH 1/7] i8042 suspend Vojtech Pavlik
2004-01-03 16:50     ` Dmitry Torokhov
2004-03-29 15:40     ` Dmitry Torokhov
2004-01-18 19:23   ` Russell King
2004-01-18 22:42     ` Dmitry Torokhov
2004-03-29 15:39   ` Vojtech Pavlik
2004-03-29 15:39   ` [PATCH 2/7] i8042 option parsing Dmitry Torokhov
2004-01-03 10:10 ` New set of input patches Vojtech Pavlik
2004-01-05  5:59 ` Dmitry Torokhov
2004-01-05  6:01   ` [PATCH 1/3] Fix compile error in 98busmouse.c module Dmitry Torokhov
2004-01-05  6:02     ` Dmitry Torokhov [this message]
2004-01-05  6:03       ` [PATCH 3/3] Convert tsdev to use module_param Dmitry Torokhov
2004-03-29 15:44       ` Dmitry Torokhov
2004-03-29 15:44     ` [PATCH 2/3] Convert mouse drivers " Dmitry Torokhov
2004-01-05  8:36   ` New set of input patches Vojtech Pavlik
2004-03-29 15:44   ` [PATCH 1/3] Fix compile error in 98busmouse.c module Dmitry Torokhov
2004-03-29 15:44   ` New set of input patches Vojtech Pavlik
2004-03-29 15:39 ` Vojtech Pavlik
2004-03-29 15:39 ` [PATCH 1/7] i8042 suspend Dmitry Torokhov
2004-03-29 15:44 ` New set of input patches Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200401050102.49892.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome