Commit 07a190a4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Convert mouse drivers to use module_param

From: Dmitry Torokhov <dtor_core@ameritech.net>

Convert the rest of mouse devices to the new way of handling kernel
parameters and document them in kernel-parameters.txt
parent 665e407e
......@@ -85,6 +85,9 @@ running once the system is up.
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 @@ running once the system is up.
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 @@ running once the system is up.
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.
......@@ -565,6 +568,11 @@ running once the system is up.
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>
......
......@@ -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 @@ MODULE_LICENSE("GPL");
#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);
......@@ -141,17 +143,6 @@ static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
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)
{
int i;
......
......@@ -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 @@ MODULE_LICENSE("GPL");
#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);
......@@ -153,17 +155,6 @@ static irqreturn_t inport_interrupt(int irq, void *dev_id, struct pt_regs *regs)
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)
{
unsigned char a,b,c;
......
......@@ -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 @@ MODULE_LICENSE("GPL");
#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);
......@@ -142,17 +144,6 @@ static irqreturn_t logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
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)
{
if (!request_region(LOGIBM_BASE, LOGIBM_EXTENT, "logibm")) {
......
......@@ -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 @@ MODULE_LICENSE("GPL");
#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 input_handler mousedev_handler;
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 @@ static void __exit mousedev_exit(void)
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");
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