summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVojtech Pavlik <vojtech@suse.cz>2004-03-03 11:59:51 +0100
committerVojtech Pavlik <vojtech@suse.cz>2004-03-03 11:59:51 +0100
commit0d32daf57c8c5ce1a11be7a99292e4f2f45aca35 (patch)
treef42fab4623f5766b9c114373c44e0ff1a1274f4e
parent912f9f42ddf8973b1294ecc7672af6c31cb6a0ff (diff)
parent366b7517f22c58bdb57df51fb5bbbc096d789324 (diff)
input: Manual merge with Dmitry.
-rw-r--r--Documentation/input/joystick-parport.txt16
-rw-r--r--Documentation/input/joystick.txt6
-rw-r--r--Documentation/kernel-parameters.txt46
-rw-r--r--arch/i386/kernel/apic.c6
-rw-r--r--drivers/input/joystick/amijoy.c19
-rw-r--r--drivers/input/joystick/analog.c28
-rw-r--r--drivers/input/joystick/db9.c67
-rw-r--r--drivers/input/joystick/gamecon.c82
-rw-r--r--drivers/input/joystick/turbografx.c68
-rw-r--r--drivers/input/keyboard/atkbd.c25
-rw-r--r--drivers/input/mouse/98busmouse.c2
-rw-r--r--drivers/input/mouse/inport.c2
-rw-r--r--drivers/input/mouse/logibm.c2
-rw-r--r--drivers/input/mouse/psmouse-base.c22
-rw-r--r--drivers/input/mouse/synaptics.c53
-rw-r--r--drivers/input/mouse/synaptics.h7
-rw-r--r--drivers/input/serio/i8042.c7
-rw-r--r--drivers/isdn/icn/icn.c6
-rw-r--r--drivers/isdn/isdnloop/isdnloop.c6
-rw-r--r--drivers/usb/host/ohci-hcd.c14
-rw-r--r--drivers/usb/host/ohci-q.c16
-rw-r--r--include/linux/init.h22
-rw-r--r--include/linux/moduleparam.h9
-rw-r--r--init/main.c7
-rw-r--r--sound/oss/dmasound/dac3550a.c12
25 files changed, 287 insertions, 263 deletions
diff --git a/Documentation/input/joystick-parport.txt b/Documentation/input/joystick-parport.txt
index 45b681255fd0..b8d92c008a7d 100644
--- a/Documentation/input/joystick-parport.txt
+++ b/Documentation/input/joystick-parport.txt
@@ -434,7 +434,7 @@ Here are described their command lines:
Using gamecon.c you can connect up to five devices to one parallel port. It
uses the following kernel/module command line:
- gc=port,pad1,pad2,pad3,pad4,pad5
+ gamecon.map=port,pad1,pad2,pad3,pad4,pad5
Where 'port' the number of the parport interface (eg. 0 for parport0).
@@ -457,15 +457,15 @@ uses the following kernel/module command line:
your controller plugged in before initializing.
Should you want to use more than one of parallel ports at once, you can use
-gc_2 and gc_3 as additional command line parameters for two more parallel
-ports.
+gamecon.map2 and gamecon.map3 as additional command line parameters for two
+more parallel ports.
3.2 db9.c
~~~~~~~~~
Apart from making an interface, there is nothing difficult on using the
db9.c driver. It uses the following kernel/module command line:
- db9=port,type
+ db9.dev=port,type
Where 'port' is the number of the parport interface (eg. 0 for parport0).
@@ -489,14 +489,14 @@ Old parallel ports may not have this feature.
10 | Amiga CD32 pad
Should you want to use more than one of these joysticks/pads at once, you
-can use db9_2 and db9_3 as additional command line parameters for two
+can use db9.dev2 and db9.dev3 as additional command line parameters for two
more joysticks/pads.
3.3 turbografx.c
~~~~~~~~~~~~~~~~
The turbografx.c driver uses a very simple kernel/module command line:
- tgfx=port,js1,js2,js3,js4,js5,js6,js7
+ turbografx.map=port,js1,js2,js3,js4,js5,js6,js7
Where 'port' is the number of the parport interface (eg. 0 for parport0).
@@ -504,8 +504,8 @@ more joysticks/pads.
interface ports 1-7 have. For a standard multisystem joystick, this is 1.
Should you want to use more than one of these interfaces at once, you can
-use tgfx_2 and tgfx_3 as additional command line parameters for two more
-interfaces.
+use turbografx.map2 and turbografx.map3 as additional command line parameters
+for two more interfaces.
3.4 PC parallel port pinout
~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/Documentation/input/joystick.txt b/Documentation/input/joystick.txt
index f63b495b6c2e..a37f6d224692 100644
--- a/Documentation/input/joystick.txt
+++ b/Documentation/input/joystick.txt
@@ -111,7 +111,7 @@ your needs:
alias tty-ldisc-2 serport
alias char-major-13 input
above input joydev ns558 analog
- options analog js=gamepad
+ options analog map=gamepad,none,2btn
2.5 Verifying that it works
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -185,7 +185,7 @@ you'll need to specify the types either on the kernel command line or on the
module command line, when inserting analog.o into the kernel. The
parameters are:
- js=type,type,type,....
+ analog.map=<type1>,<type2>,<type3>,....
'type' is type of the joystick from the table below, defining joysticks
present on gameports in the system, starting with gameport0, second 'type'
@@ -419,7 +419,7 @@ card.
Amiga joysticks, connected to an Amiga, are supported by the amijoy.c
driver. Since they can't be autodetected, the driver has a command line.
- amijoy=a,b
+ amijoy.map=<a>,<b>
a and b define the joysticks connected to the JOY0DAT and JOY1DAT ports of
the Amiga.
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 81f246ece199..b3bfb2f1b866 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -151,7 +151,15 @@ running once the system is up.
Format: <host-scsi-id>,<target-scsi-id>,<max-rate>,<max-offset>
See also header of drivers/scsi/AM53C974.c.
- amijoy= [HW,JOY] Amiga joystick support
+ amijoy.map= [HW,JOY] Amiga joystick support
+ Map of devices attached to JOY0DAT and JOY1DAT
+ Format: <a>,<b>
+ See also Documentation/kernel/input/joystick.txt
+
+ analog.map= [HW,JOY] Analog joystick and gamepad support
+ Specifies type or capabilities of an analog joystick
+ connected to one of 16 gameports
+ Format: <type1>,<type2>,..<type16>
apc= [HW,SPARC] Power management functions (SPARCstation-4/5 + deriv.)
Format: noidle
@@ -287,10 +295,11 @@ running once the system is up.
dasd= [HW,NET]
See header of drivers/s390/block/dasd_devmap.c.
- db9= [HW,JOY]
- db9_2=
- db9_3=
-
+ db9.dev[2|3]= [HW,JOY] Multisystem joystick support via parallel port
+ (one device per port)
+ Format: <port#>,<type>
+ See also Documentation/input/joystick-parport.txt
+
debug [KNL] Enable kernel debugging (events log level).
decnet= [HW,NET]
@@ -384,12 +393,14 @@ running once the system is up.
ftape= [HW] Floppy Tape subsystem debugging options.
See Documentation/ftape.txt.
+ gamecon.map[2|3]=
+ [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
+ support via parallel port (up to 5 devices per port)
+ Format: <port#>,<pad1>,<pad2>,<pad3>,<pad4>,<pad5>
+ See also Documentation/input/joystick-parport.txt
+
gamma= [HW,DRM]
- gc= [HW,JOY]
- gc_2= See Documentation/input/joystick-parport.txt.
- gc_3=
-
gdth= [HW,SCSI]
See header of drivers/scsi/gdth.c.
@@ -616,9 +627,9 @@ running once the system is up.
mga= [HW,DRM]
- mousedev.xres [MOUSE] Horizontal screen resolution, used for devices
+ mousedev.xres= [MOUSE] Horizontal screen resolution, used for devices
reporting absolute coordinates, such as tablets
- mousedev.yres [MOUSE] Vertical screen resolution, used for devices
+ mousedev.yres= [MOUSE] Vertical screen resolution, used for devices
reporting absolute coordinates, such as tablets
mpu401= [HW,OSS]
@@ -1163,10 +1174,6 @@ running once the system is up.
See header of drivers/scsi/t128.c.
tdfx= [HW,DRM]
-
- tgfx= [HW,JOY] TurboGraFX parallel port interface
- tgfx_2= See Documentation/input/joystick-parport.txt.
- tgfx_3=
thash_entries= [KNL,NET]
Set number of hash buckets for TCP connection
@@ -1189,8 +1196,13 @@ running once the system is up.
trix= [HW,OSS] MediaTrix AudioTrix Pro
Format: <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
- tsdev.xres [TS] Horizontal screen resolution.
- tsdev.yres [TS] Vertical screen resolution.
+ tsdev.xres= [TS] Horizontal screen resolution.
+ tsdev.yres= [TS] Vertical screen resolution.
+
+ turbografx.map[2|3]=
+ [HW,JOY] TurboGraFX parallel port interface
+ Format: <port#>,<js1>,<js2>,<js3>,<js4>,<js5>,<js6>,<js7>
+ See also Documentation/input/joystick-parport.txt
u14-34f= [HW,SCSI] UltraStor 14F/34F SCSI host adapter
See header of drivers/scsi/u14-34f.c.
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index cb9539b412f0..60df32064c1e 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -248,12 +248,6 @@ int __init verify_local_APIC(void)
*/
reg0 = apic_read(APIC_ID);
Dprintk("Getting ID: %x\n", reg0);
- apic_write(APIC_ID, reg0 ^ APIC_ID_MASK);
- reg1 = apic_read(APIC_ID);
- Dprintk("Getting ID: %x\n", reg1);
- apic_write(APIC_ID, reg0);
- if (reg1 != (reg0 ^ APIC_ID_MASK))
- return 0;
/*
* The next two are just to see if we have sane values.
diff --git a/drivers/input/joystick/amijoy.c b/drivers/input/joystick/amijoy.c
index c84662f60ba1..df57287ccce1 100644
--- a/drivers/input/joystick/amijoy.c
+++ b/drivers/input/joystick/amijoy.c
@@ -32,6 +32,7 @@
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/interrupt.h>
@@ -42,10 +43,15 @@
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("Driver for Amiga joysticks");
-MODULE_PARM(amijoy, "1-2i");
MODULE_LICENSE("GPL");
static int amijoy[2] = { 0, 1 };
+static int amijoy_nargs;
+module_param_array_named(map, amijoy, uint, amijoy_nargs, 0);
+MODULE_PARM_DESC(map, "Map of attached joysticks in form of <a>,<b> (default is 0,1)");
+
+__obsolete_setup("amijoy=");
+
static int amijoy_used[2] = { 0, 0 };
static struct input_dev amijoy_dev[2];
static char *amijoy_phys[2] = { "amijoy/input0", "amijoy/input1" };
@@ -101,17 +107,6 @@ static void amijoy_close(struct input_dev *dev)
free_irq(IRQ_AMIGA_VERTB, amijoy_interrupt);
}
-static int __init amijoy_setup(char *str)
-{
- int i;
- int ints[4];
-
- str = get_options(str, ARRAY_SIZE(ints), ints);
- for (i = 0; i <= ints[0] && i < 2; i++) amijoy[i] = ints[i+1];
- return 1;
-}
-__setup("amijoy=", amijoy_setup);
-
static int __init amijoy_init(void)
{
int i, j;
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
index acd405370d8d..d76c5fbdfe8a 100644
--- a/drivers/input/joystick/analog.c
+++ b/drivers/input/joystick/analog.c
@@ -32,6 +32,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/bitops.h>
#include <linux/init.h>
@@ -50,9 +51,12 @@ MODULE_LICENSE("GPL");
#define ANALOG_PORTS 16
static char *js[ANALOG_PORTS];
+static int js_nargs;
static int analog_options[ANALOG_PORTS];
-MODULE_PARM(js, "1-" __MODULE_STRING(ANALOG_PORTS) "s");
-MODULE_PARM_DESC(js, "Analog joystick options");
+module_param_array_named(map, js, charp, js_nargs, 0);
+MODULE_PARM_DESC(map, "Describes analog joysticks type/capabilities");
+
+__obsolete_setup("js=");
/*
* Times, feature definitions.
@@ -711,7 +715,7 @@ static void analog_parse_options(void)
int i, j;
char *end;
- for (i = 0; i < ANALOG_PORTS && js[i]; i++) {
+ for (i = 0; i < js_nargs; i++) {
for (j = 0; analog_types[j].name; j++)
if (!strcmp(analog_types[j].name, js[i])) {
@@ -742,24 +746,6 @@ static struct gameport_dev analog_dev = {
.disconnect = analog_disconnect,
};
-#ifndef MODULE
-static int __init analog_setup(char *str)
-{
- char *s = str;
- int i = 0;
-
- if (!str || !*str) return 0;
-
- while ((str = s) && (i < ANALOG_PORTS)) {
- if ((s = strchr(str,','))) *s++ = 0;
- js[i++] = str;
- }
-
- return 1;
-}
-__setup("js=", analog_setup);
-#endif
-
int __init analog_init(void)
{
analog_parse_options();
diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c
index 0ee467e1c48a..f7d3eebd7d0f 100644
--- a/drivers/input/joystick/db9.c
+++ b/drivers/input/joystick/db9.c
@@ -33,6 +33,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/parport.h>
@@ -42,9 +43,24 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("Atari, Amstrad, Commodore, Amiga, Sega, etc. joystick driver");
MODULE_LICENSE("GPL");
-MODULE_PARM(db9, "2i");
-MODULE_PARM(db9_2, "2i");
-MODULE_PARM(db9_3, "2i");
+static int db9[] __initdata = { -1, 0 };
+static int db9_nargs __initdata = 0;
+module_param_array_named(dev, db9, int, db9_nargs, 0);
+MODULE_PARM_DESC(dev, "Describes first attached device (<parport#>,<type>)");
+
+static int db9_2[] __initdata = { -1, 0 };
+static int db9_nargs_2 __initdata = 0;
+module_param_array_named(dev2, db9_2, int, db9_nargs_2, 0);
+MODULE_PARM_DESC(dev2, "Describes second attached device (<parport#>,<type>)");
+
+static int db9_3[] __initdata = { -1, 0 };
+static int db9_nargs_3 __initdata = 0;
+module_param_array_named(dev3, db9_3, int, db9_nargs_3, 0);
+MODULE_PARM_DESC(dev3, "Describes third attached device (<parport#>,<type>)");
+
+__obsolete_setup("db9=");
+__obsolete_setup("db9_2=");
+__obsolete_setup("db9_3=");
#define DB9_MULTI_STICK 0x01
#define DB9_MULTI2_STICK 0x02
@@ -76,10 +92,6 @@ MODULE_PARM(db9_3, "2i");
#define DB9_GENESIS6_DELAY 14
#define DB9_REFRESH_TIME HZ/100
-static int db9[] __initdata = { -1, 0 };
-static int db9_2[] __initdata = { -1, 0 };
-static int db9_3[] __initdata = { -1, 0 };
-
struct db9 {
struct input_dev dev[DB9_MAX_DEVICES];
struct timer_list timer;
@@ -518,7 +530,7 @@ static void db9_close(struct input_dev *dev)
}
}
-static struct db9 __init *db9_probe(int *config)
+static struct db9 __init *db9_probe(int *config, int nargs)
{
struct db9 *db9;
struct parport *pp;
@@ -526,6 +538,12 @@ static struct db9 __init *db9_probe(int *config)
if (config[0] < 0)
return NULL;
+
+ if (nargs < 2) {
+ printk(KERN_ERR "db9.c: Device type must be specified.\n");
+ return NULL;
+ }
+
if (config[1] < 1 || config[1] >= DB9_MAX_PAD || !db9_buttons[config[1]]) {
printk(KERN_ERR "db9.c: bad config\n");
return NULL;
@@ -601,38 +619,11 @@ static struct db9 __init *db9_probe(int *config)
return db9;
}
-#ifndef MODULE
-static int __init db9_setup(char *str)
-{
- int i, ints[3];
- get_options(str, ARRAY_SIZE(ints), ints);
- for (i = 0; i <= ints[0] && i < 2; i++) db9[i] = ints[i + 1];
- return 1;
-}
-static int __init db9_setup_2(char *str)
-{
- int i, ints[3];
- get_options(str, ARRAY_SIZE(ints), ints);
- for (i = 0; i <= ints[0] && i < 2; i++) db9_2[i] = ints[i + 1];
- return 1;
-}
-static int __init db9_setup_3(char *str)
-{
- int i, ints[3];
- get_options(str, ARRAY_SIZE(ints), ints);
- for (i = 0; i <= ints[0] && i < 2; i++) db9_3[i] = ints[i + 1];
- return 1;
-}
-__setup("db9=", db9_setup);
-__setup("db9_2=", db9_setup_2);
-__setup("db9_3=", db9_setup_3);
-#endif
-
int __init db9_init(void)
{
- db9_base[0] = db9_probe(db9);
- db9_base[1] = db9_probe(db9_2);
- db9_base[2] = db9_probe(db9_3);
+ db9_base[0] = db9_probe(db9, db9_nargs);
+ db9_base[1] = db9_probe(db9_2, db9_nargs_2);
+ db9_base[2] = db9_probe(db9_3, db9_nargs_3);
if (db9_base[0] || db9_base[1] || db9_base[2])
return 0;
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index ae94ab8141d9..02ee05a98c50 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -35,6 +35,7 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/parport.h>
#include <linux/input.h>
@@ -43,10 +44,26 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("NES, SNES, N64, MultiSystem, PSX gamepad driver");
MODULE_LICENSE("GPL");
-MODULE_PARM(gc, "2-6i");
-MODULE_PARM(gc_2,"2-6i");
-MODULE_PARM(gc_3,"2-6i");
-MODULE_PARM(gc_psx_delay, "i");
+static int gc[] __initdata = { -1, 0, 0, 0, 0, 0 };
+static int gc_nargs __initdata = 0;
+module_param_array_named(map, gc, int, gc_nargs, 0);
+MODULE_PARM_DESC(map, "Describers first set of devices (<parport#>,<pad1>,<pad2>,..<pad5>)");
+
+static int gc_2[] __initdata = { -1, 0, 0, 0, 0, 0 };
+static int gc_nargs_2 __initdata = 0;
+module_param_array_named(map2, gc_2, int, gc_nargs_2, 0);
+MODULE_PARM_DESC(map2, "Describers second set of devices");
+
+static int gc_3[] __initdata = { -1, 0, 0, 0, 0, 0 };
+static int gc_nargs_3 __initdata = 0;
+module_param_array_named(map3, gc_3, int, gc_nargs_3, 0);
+MODULE_PARM_DESC(map3, "Describers third set of devices");
+
+__obsolete_setup("gc=");
+__obsolete_setup("gc_2=");
+__obsolete_setup("gc_3=");
+
+/* see also gs_psx_delay parameter in PSX support section */
#define GC_SNES 1
#define GC_NES 2
@@ -71,10 +88,6 @@ struct gc {
static struct gc *gc_base[3];
-static int gc[] __initdata = { -1, 0, 0, 0, 0, 0 };
-static int gc_2[] __initdata = { -1, 0, 0, 0, 0, 0 };
-static int gc_3[] __initdata = { -1, 0, 0, 0, 0, 0 };
-
static int gc_status_bit[] = { 0x40, 0x80, 0x20, 0x10, 0x08 };
static char *gc_names[] = { NULL, "SNES pad", "NES pad", "NES FourPort", "Multisystem joystick",
@@ -232,6 +245,11 @@ static void gc_multi_read_packet(struct gc *gc, int length, unsigned char *data)
#define GC_PSX_LEN(x) ((x) & 0xf) /* Low nibble is length in words */
static int gc_psx_delay = GC_PSX_DELAY;
+module_param_named(psx_delay, gc_psx_delay, uint, 0);
+MODULE_PARM_DESC(psx_delay, "Delay when accessing Sony PSX controller (usecs)");
+
+__obsolete_setup("gc_psx_delay=");
+
static short gc_psx_abs[] = { ABS_X, ABS_Y, ABS_RX, ABS_RY, ABS_HAT0X, ABS_HAT0Y };
static short gc_psx_btn[] = { BTN_TL, BTN_TR, BTN_TL2, BTN_TR2, BTN_A, BTN_B, BTN_X, BTN_Y,
BTN_START, BTN_SELECT, BTN_THUMBL, BTN_THUMBR };
@@ -468,7 +486,7 @@ static void gc_close(struct input_dev *dev)
}
}
-static struct gc __init *gc_probe(int *config)
+static struct gc __init *gc_probe(int *config, int nargs)
{
struct gc *gc;
struct parport *pp;
@@ -478,6 +496,11 @@ static struct gc __init *gc_probe(int *config)
if (config[0] < 0)
return NULL;
+ if (nargs < 2) {
+ printk(KERN_ERR "gamecon.c: at least one device must be specified\n");
+ return NULL;
+ }
+
pp = parport_find_number(config[0]);
if (!pp) {
@@ -507,7 +530,7 @@ static struct gc __init *gc_probe(int *config)
gc->timer.data = (long) gc;
gc->timer.function = gc_timer;
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < nargs - 1; i++) {
if (!config[i + 1])
continue;
@@ -632,44 +655,11 @@ static struct gc __init *gc_probe(int *config)
return gc;
}
-#ifndef MODULE
-static int __init gc_setup(char *str)
-{
- int i, ints[7];
- get_options(str, ARRAY_SIZE(ints), ints);
- for (i = 0; i <= ints[0] && i < 6; i++) gc[i] = ints[i + 1];
- return 1;
-}
-static int __init gc_setup_2(char *str)
-{
- int i, ints[7];
- get_options(str, ARRAY_SIZE(ints), ints);
- for (i = 0; i <= ints[0] && i < 6; i++) gc_2[i] = ints[i + 1];
- return 1;
-}
-static int __init gc_setup_3(char *str)
-{
- int i, ints[7];
- get_options(str, ARRAY_SIZE(ints), ints);
- for (i = 0; i <= ints[0] && i < 6; i++) gc_3[i] = ints[i + 1];
- return 1;
-}
-static int __init gc_psx_setup(char *str)
-{
- get_option(&str, &gc_psx_delay);
- return 1;
-}
-__setup("gc=", gc_setup);
-__setup("gc_2=", gc_setup_2);
-__setup("gc_3=", gc_setup_3);
-__setup("gc_psx_delay=", gc_psx_setup);
-#endif
-
int __init gc_init(void)
{
- gc_base[0] = gc_probe(gc);
- gc_base[1] = gc_probe(gc_2);
- gc_base[2] = gc_probe(gc_3);
+ gc_base[0] = gc_probe(gc, gc_nargs);
+ gc_base[1] = gc_probe(gc_2, gc_nargs_2);
+ gc_base[2] = gc_probe(gc_3, gc_nargs_3);
if (gc_base[0] || gc_base[1] || gc_base[2])
return 0;
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c
index 718e8f706a9d..8cf86aa83072 100644
--- a/drivers/input/joystick/turbografx.c
+++ b/drivers/input/joystick/turbografx.c
@@ -35,15 +35,31 @@
#include <linux/parport.h>
#include <linux/input.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/init.h>
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("TurboGraFX parallel port interface driver");
MODULE_LICENSE("GPL");
-MODULE_PARM(tgfx, "2-8i");
-MODULE_PARM(tgfx_2, "2-8i");
-MODULE_PARM(tgfx_3, "2-8i");
+static int tgfx[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 };
+static int tgfx_nargs __initdata = 0;
+module_param_array_named(map, tgfx, int, tgfx_nargs, 0);
+MODULE_PARM_DESC(map, "Describes first set of devices (<parport#>,<js1>,<js2>,..<js7>");
+
+static int tgfx_2[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 };
+static int tgfx_nargs_2 __initdata = 0;
+module_param_array_named(map2, tgfx_2, int, tgfx_nargs_2, 0);
+MODULE_PARM_DESC(map2, "Describes second set of devices");
+
+static int tgfx_3[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 };
+static int tgfx_nargs_3 __initdata = 0;
+module_param_array_named(map3, tgfx_3, int, tgfx_nargs_3, 0);
+MODULE_PARM_DESC(map3, "Describes third set of devices");
+
+__obsolete_setup("tgfx=");
+__obsolete_setup("tgfx_2=");
+__obsolete_setup("tgfx_3=");
#define TGFX_REFRESH_TIME HZ/100 /* 10 ms */
@@ -58,10 +74,6 @@ MODULE_PARM(tgfx_3, "2-8i");
#define TGFX_TOP 0x01
#define TGFX_TOP2 0x08
-static int tgfx[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 };
-static int tgfx_2[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 };
-static int tgfx_3[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 };
-
static int tgfx_buttons[] = { BTN_TRIGGER, BTN_THUMB, BTN_THUMB2, BTN_TOP, BTN_TOP2 };
static char *tgfx_name = "TurboGraFX Multisystem joystick";
@@ -133,7 +145,7 @@ static void tgfx_close(struct input_dev *dev)
* tgfx_probe() probes for tg gamepads.
*/
-static struct tgfx __init *tgfx_probe(int *config)
+static struct tgfx __init *tgfx_probe(int *config, int nargs)
{
struct tgfx *tgfx;
struct parport *pp;
@@ -142,6 +154,11 @@ static struct tgfx __init *tgfx_probe(int *config)
if (config[0] < 0)
return NULL;
+ if (nargs < 2) {
+ printk(KERN_ERR "turbografx.c: at least one joystick must be specified\n");
+ return NULL;
+ }
+
pp = parport_find_number(config[0]);
if (!pp) {
@@ -171,7 +188,7 @@ static struct tgfx __init *tgfx_probe(int *config)
tgfx->sticks = 0;
- for (i = 0; i < 7; i++)
+ for (i = 0; i < nargs - 1; i++)
if (config[i+1] > 0 && config[i+1] < 6) {
tgfx->sticks |= (1 << i);
@@ -212,38 +229,11 @@ static struct tgfx __init *tgfx_probe(int *config)
return tgfx;
}
-#ifndef MODULE
-static int __init tgfx_setup(char *str)
-{
- int i, ints[9];
- get_options(str, ARRAY_SIZE(ints), ints);
- for (i = 0; i <= ints[0] && i < 8; i++) tgfx[i] = ints[i + 1];
- return 1;
-}
-static int __init tgfx_setup_2(char *str)
-{
- int i, ints[9];
- get_options(str, ARRAY_SIZE(ints), ints);
- for (i = 0; i <= ints[0] && i < 8; i++) tgfx_2[i] = ints[i + 1];
- return 1;
-}
-static int __init tgfx_setup_3(char *str)
-{
- int i, ints[9];
- get_options(str, ARRAY_SIZE(ints), ints);
- for (i = 0; i <= ints[0] && i < 8; i++) tgfx_3[i] = ints[i + 1];
- return 1;
-}
-__setup("tgfx=", tgfx_setup);
-__setup("tgfx_2=", tgfx_setup_2);
-__setup("tgfx_3=", tgfx_setup_3);
-#endif
-
int __init tgfx_init(void)
{
- tgfx_base[0] = tgfx_probe(tgfx);
- tgfx_base[1] = tgfx_probe(tgfx_2);
- tgfx_base[2] = tgfx_probe(tgfx_3);
+ tgfx_base[0] = tgfx_probe(tgfx, tgfx_nargs);
+ tgfx_base[1] = tgfx_probe(tgfx_2, tgfx_nargs_2);
+ tgfx_base[2] = tgfx_probe(tgfx_3, tgfx_nargs_3);
if (tgfx_base[0] || tgfx_base[1] || tgfx_base[2])
return 0;
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index e1e52dbdbff4..5451481a2772 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -30,9 +30,6 @@
MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
MODULE_DESCRIPTION("AT and PS/2 keyboard driver");
-MODULE_PARM(atkbd_set, "1i");
-MODULE_PARM(atkbd_reset, "1i");
-MODULE_PARM(atkbd_softrepeat, "1i");
MODULE_LICENSE("GPL");
static int atkbd_set = 2;
@@ -59,6 +56,10 @@ static int atkbd_extra;
module_param_named(extra, atkbd_extra, bool, 0);
MODULE_PARM_DESC(extra, "Enable extra LEDs and keys on IBM RapidAcces, EzKey and similar keyboards");
+__obsolete_setup("atkbd_set=");
+__obsolete_setup("atkbd_reset");
+__obsolete_setup("atkbd_softrepeat=");
+
/*
* Scancode to keycode tables. These are just the default setting, and
* are loadable via an userland utility.
@@ -227,7 +228,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
atkbd->resend = 1;
goto out;
}
-
+
if (!flags && data == ATKBD_RET_ACK)
atkbd->resend = 0;
#endif
@@ -301,7 +302,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
case ATKBD_KEY_UNKNOWN:
printk(KERN_WARNING "atkbd.c: Unknown key %s (%s set %d, code %#x on %s).\n",
atkbd->release ? "released" : "pressed",
- atkbd->translated ? "translated" : "raw",
+ atkbd->translated ? "translated" : "raw",
atkbd->set, code, serio->phys);
if (atkbd->translated && atkbd->set == 2 && code == 0x7a)
printk(KERN_WARNING "atkbd.c: This is an XFree86 bug. It shouldn't access"
@@ -400,7 +401,7 @@ static int atkbd_command(struct atkbd *atkbd, unsigned char *param, int command)
if (receive && param)
for (i = 0; i < receive; i++)
atkbd->cmdbuf[(receive - 1) - i] = param[i];
-
+
if (command & 0xff)
if (atkbd_sendbyte(atkbd, command & 0xff))
return (atkbd->cmdcnt = 0) - 1;
@@ -420,7 +421,7 @@ static int atkbd_command(struct atkbd *atkbd, unsigned char *param, int command)
atkbd->cmdcnt = 0;
break;
}
-
+
udelay(1);
}
@@ -513,7 +514,7 @@ static int atkbd_probe(struct atkbd *atkbd)
*/
if (atkbd_reset)
- if (atkbd_command(atkbd, NULL, ATKBD_CMD_RESET_BAT))
+ if (atkbd_command(atkbd, NULL, ATKBD_CMD_RESET_BAT))
printk(KERN_WARNING "atkbd.c: keyboard reset failed on %s\n", atkbd->serio->phys);
/*
@@ -584,7 +585,7 @@ static int atkbd_set_3(struct atkbd *atkbd)
}
}
- if (atkbd_set != 3)
+ if (atkbd_set != 3)
return 2;
if (!atkbd_command(atkbd, param, ATKBD_CMD_OK_GETID)) {
@@ -685,7 +686,7 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
switch (serio->type & SERIO_TYPE) {
- case SERIO_8042_XL:
+ case SERIO_8042_XL:
atkbd->translated = 1;
case SERIO_8042:
if (serio->write)
@@ -698,7 +699,7 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
kfree(atkbd);
return;
}
-
+
if (atkbd->write) {
atkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP);
atkbd->dev.ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL);
@@ -735,7 +736,7 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
kfree(atkbd);
return;
}
-
+
atkbd->set = atkbd_set_3(atkbd);
atkbd_enable(atkbd);
diff --git a/drivers/input/mouse/98busmouse.c b/drivers/input/mouse/98busmouse.c
index 94a4882e60a8..fed160f4cd22 100644
--- a/drivers/input/mouse/98busmouse.c
+++ b/drivers/input/mouse/98busmouse.c
@@ -74,6 +74,8 @@ static int pc98bm_irq = PC98BM_IRQ;
module_param_named(irq, pc98bm_irq, uint, 0);
MODULE_PARM_DESC(irq, "IRQ number (13=default)");
+__obsolete_setup("pc98bm_irq=");
+
static int pc98bm_used = 0;
static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
diff --git a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c
index c6ff4b49d4bb..ca4e96886627 100644
--- a/drivers/input/mouse/inport.c
+++ b/drivers/input/mouse/inport.c
@@ -85,6 +85,8 @@ static int inport_irq = INPORT_IRQ;
module_param_named(irq, inport_irq, uint, 0);
MODULE_PARM_DESC(irq, "IRQ number (5=default)");
+__obsolete_setup("inport_irq=");
+
static int inport_used;
static irqreturn_t inport_interrupt(int irq, void *dev_id, struct pt_regs *regs);
diff --git a/drivers/input/mouse/logibm.c b/drivers/input/mouse/logibm.c
index 6b972dd26735..77eb83e87f61 100644
--- a/drivers/input/mouse/logibm.c
+++ b/drivers/input/mouse/logibm.c
@@ -75,6 +75,8 @@ static int logibm_irq = LOGIBM_IRQ;
module_param_named(irq, logibm_irq, uint, 0);
MODULE_PARM_DESC(irq, "IRQ number (5=default)");
+__obsolete_setup("logibm_irq=");
+
static int logibm_used = 0;
static irqreturn_t logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index 19ab40865600..dd52a465a61c 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -47,6 +47,12 @@ unsigned int psmouse_resetafter;
module_param_named(resetafter, psmouse_resetafter, uint, 0);
MODULE_PARM_DESC(resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
+__obsolete_setup("psmouse_noext");
+__obsolete_setup("psmouse_resolution=");
+__obsolete_setup("psmouse_smartscroll=");
+__obsolete_setup("psmouse_resetafter=");
+__obsolete_setup("psmouse_rate=");
+
static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2"};
/*
@@ -163,14 +169,14 @@ static irqreturn_t psmouse_interrupt(struct serio *serio,
psmouse->name, psmouse->phys, psmouse->pktcnt);
psmouse->pktcnt = 0;
}
-
+
psmouse->last = jiffies;
psmouse->packet[psmouse->pktcnt++] = data;
if (psmouse->packet[0] == PSMOUSE_RET_BAT) {
if (psmouse->pktcnt == 1)
goto out;
-
+
if (psmouse->pktcnt == 2) {
if (psmouse->packet[1] == PSMOUSE_RET_ID) {
psmouse->state = PSMOUSE_IGNORE;
@@ -258,7 +264,7 @@ int psmouse_command(struct psmouse *psmouse, unsigned char *param, int command)
return (psmouse->cmdcnt = 0) - 1;
while (psmouse->cmdcnt && timeout--) {
-
+
if (psmouse->cmdcnt == 1 && command == PSMOUSE_CMD_RESET_BAT &&
timeout > 100000) /* do not run in a endless loop */
timeout = 100000; /* 1 sec */
@@ -442,7 +448,7 @@ static int psmouse_probe(struct psmouse *psmouse)
*/
if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_RESET_DIS))
- return -1;
+ printk(KERN_WARNING "psmouse.c: Failed to reset mouse on %s\n", psmouse->serio->phys);
/*
* And here we try to determine if it has any extensions over the
@@ -497,7 +503,7 @@ static void psmouse_set_rate(struct psmouse *psmouse)
static void psmouse_initialize(struct psmouse *psmouse)
{
unsigned char param[2];
-
+
/*
* We set the mouse report rate, resolution and scaling.
*/
@@ -571,7 +577,7 @@ static void psmouse_disconnect(struct serio *serio)
static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
{
struct psmouse *psmouse;
-
+
if ((serio->type & SERIO_TYPE) != SERIO_8042 &&
(serio->type & SERIO_TYPE) != SERIO_PS_PSTHRU)
return;
@@ -603,7 +609,7 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
serio->private = NULL;
return;
}
-
+
sprintf(psmouse->devname, "%s %s %s",
psmouse_protocols[psmouse->type], psmouse->vendor, psmouse->name);
sprintf(psmouse->phys, "%s/input0",
@@ -617,7 +623,7 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
psmouse->dev.id.version = psmouse->model;
input_register_device(&psmouse->dev);
-
+
printk(KERN_INFO "input: %s on %s\n", psmouse->devname, serio->phys);
psmouse_initialize(psmouse);
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index a41d90f55cb4..2894ea1bba30 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -435,6 +435,8 @@ int synaptics_init(struct psmouse *psmouse)
goto init_fail;
}
+ priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS;
+
if (SYN_CAP_EXTENDED(priv->capabilities) && SYN_CAP_PASS_THROUGH(priv->capabilities))
synaptics_pt_create(psmouse);
@@ -602,19 +604,42 @@ static void synaptics_process_packet(struct psmouse *psmouse)
input_sync(dev);
}
-static int synaptics_validate_byte(struct psmouse *psmouse)
+static int synaptics_validate_byte(unsigned char packet[], int idx, unsigned char pkt_type)
{
- static unsigned char newabs_mask[] = { 0xC0, 0x00, 0x00, 0xC0, 0x00 };
- static unsigned char newabs_rslt[] = { 0x80, 0x00, 0x00, 0xC0, 0x00 };
- static unsigned char oldabs_mask[] = { 0xC0, 0x60, 0x00, 0xC0, 0x60 };
- static unsigned char oldabs_rslt[] = { 0xC0, 0x00, 0x00, 0x80, 0x00 };
- struct synaptics_data *priv = psmouse->private;
- int idx = psmouse->pktcnt - 1;
+ static unsigned char newabs_mask[] = { 0xC8, 0x00, 0x00, 0xC8, 0x00 };
+ static unsigned char newabs_rel_mask[] = { 0xC0, 0x00, 0x00, 0xC0, 0x00 };
+ static unsigned char newabs_rslt[] = { 0x80, 0x00, 0x00, 0xC0, 0x00 };
+ static unsigned char oldabs_mask[] = { 0xC0, 0x60, 0x00, 0xC0, 0x60 };
+ static unsigned char oldabs_rslt[] = { 0xC0, 0x00, 0x00, 0x80, 0x00 };
- if (SYN_MODEL_NEWABS(priv->model_id))
- return (psmouse->packet[idx] & newabs_mask[idx]) == newabs_rslt[idx];
- else
- return (psmouse->packet[idx] & oldabs_mask[idx]) == oldabs_rslt[idx];
+ switch (pkt_type) {
+ case SYN_NEWABS:
+ case SYN_NEWABS_RELAXED:
+ return (packet[idx] & newabs_rel_mask[idx]) == newabs_rslt[idx];
+
+ case SYN_NEWABS_STRICT:
+ return (packet[idx] & newabs_mask[idx]) == newabs_rslt[idx];
+
+ case SYN_OLDABS:
+ return (packet[idx] & oldabs_mask[idx]) == oldabs_rslt[idx];
+
+ default:
+ printk(KERN_ERR "synaptics: unknown packet type %d\n", pkt_type);
+ return 0;
+ }
+}
+
+static unsigned char synaptics_detect_pkt_type(struct psmouse *psmouse)
+{
+ int i;
+
+ for (i = 0; i < 5; i++)
+ if (!synaptics_validate_byte(psmouse->packet, i, SYN_NEWABS_STRICT)) {
+ printk(KERN_INFO "synaptics: using relaxed packet validation\n");
+ return SYN_NEWABS_RELAXED;
+ }
+
+ return SYN_NEWABS_STRICT;
}
void synaptics_process_byte(struct psmouse *psmouse, struct pt_regs *regs)
@@ -630,13 +655,17 @@ void synaptics_process_byte(struct psmouse *psmouse, struct pt_regs *regs)
printk(KERN_NOTICE "Synaptics driver resynced.\n");
}
+ if (unlikely(priv->pkt_type == SYN_NEWABS))
+ priv->pkt_type = synaptics_detect_pkt_type(psmouse);
+
if (psmouse->ptport && psmouse->ptport->serio.dev && synaptics_is_pt_packet(psmouse->packet))
synaptics_pass_pt_packet(&psmouse->ptport->serio, psmouse->packet);
else
synaptics_process_packet(psmouse);
psmouse->pktcnt = 0;
- } else if (psmouse->pktcnt && !synaptics_validate_byte(psmouse)) {
+ } else if (psmouse->pktcnt &&
+ !synaptics_validate_byte(psmouse->packet, psmouse->pktcnt - 1, priv->pkt_type)) {
printk(KERN_WARNING "Synaptics driver lost sync at byte %d\n", psmouse->pktcnt);
psmouse->pktcnt = 0;
if (++priv->out_of_sync == psmouse_resetafter) {
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
index dbb1a25aff4c..2b41ee0c1afc 100644
--- a/drivers/input/mouse/synaptics.h
+++ b/drivers/input/mouse/synaptics.h
@@ -70,6 +70,12 @@ extern int synaptics_init(struct psmouse *psmouse);
#define SYN_PS_SET_MODE2 0x14
#define SYN_PS_CLIENT_CMD 0x28
+/* synaptics packet types */
+#define SYN_NEWABS 0
+#define SYN_NEWABS_STRICT 1
+#define SYN_NEWABS_RELAXED 2
+#define SYN_OLDABS 3
+
/*
* A structure to describe the state of the touchpad hardware (buttons and pad)
*/
@@ -103,6 +109,7 @@ struct synaptics_data {
/* Data for normal processing */
unsigned int out_of_sync; /* # of packets out of sync */
int old_w; /* Previous w value */
+ unsigned char pkt_type; /* packet type - old, new, etc */
};
#endif /* _SYNAPTICS_H */
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index d36cd1736789..445f5042d593 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -52,6 +52,13 @@ static unsigned int i8042_dumbkbd;
module_param_named(dumbkbd, i8042_dumbkbd, bool, 0);
MODULE_PARM_DESC(dumbkbd, "Pretend that controller can only read data from keyboard");
+__obsolete_setup("i8042_noaux");
+__obsolete_setup("i8042_nomux");
+__obsolete_setup("i8042_unlock");
+__obsolete_setup("i8042_reset");
+__obsolete_setup("i8042_direct");
+__obsolete_setup("i8042_dumbkbd");
+
#undef DEBUG
#include "i8042.h"
diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c
index b715a91f3dbf..391a8f139c08 100644
--- a/drivers/isdn/icn/icn.c
+++ b/drivers/isdn/icn/icn.c
@@ -504,19 +504,19 @@ icn_parse_status(u_char * status, int channel, icn_card * card)
case 3:
{
char *t = status + 6;
- char *s = strpbrk(t, ",");
+ char *s = strchr(t, ',');
*s++ = '\0';
strlcpy(cmd.parm.setup.phone, t,
sizeof(cmd.parm.setup.phone));
- s = strpbrk(t = s, ",");
+ s = strchr(t = s, ',');
*s++ = '\0';
if (!strlen(t))
cmd.parm.setup.si1 = 0;
else
cmd.parm.setup.si1 =
simple_strtoul(t, NULL, 10);
- s = strpbrk(t = s, ",");
+ s = strchr(t = s, ',');
*s++ = '\0';
if (!strlen(t))
cmd.parm.setup.si2 = 0;
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c
index 040638d97480..fde3db9abb60 100644
--- a/drivers/isdn/isdnloop/isdnloop.c
+++ b/drivers/isdn/isdnloop/isdnloop.c
@@ -122,17 +122,17 @@ static void
isdnloop_parse_setup(char *setup, isdn_ctrl * cmd)
{
char *t = setup;
- char *s = strpbrk(t, ",");
+ char *s = strchr(t, ',');
*s++ = '\0';
strlcpy(cmd->parm.setup.phone, t, sizeof(cmd->parm.setup.phone));
- s = strpbrk(t = s, ",");
+ s = strchr(t = s, ',');
*s++ = '\0';
if (!strlen(t))
cmd->parm.setup.si1 = 0;
else
cmd->parm.setup.si1 = simple_strtoul(t, NULL, 10);
- s = strpbrk(t = s, ",");
+ s = strchr(t = s, ',');
*s++ = '\0';
if (!strlen(t))
cmd->parm.setup.si2 = 0;
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 87103c77e226..02c7e3152dbe 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -229,11 +229,21 @@ static int ohci_urb_enqueue (
goto fail;
}
+ /* in case of unlink-during-submit */
+ spin_lock (&urb->lock);
+ if (urb->status != -EINPROGRESS) {
+ spin_unlock (&urb->lock);
+
+ finish_urb (ohci, urb, 0);
+ retval = 0;
+ goto fail;
+ }
+
/* schedule the ed if needed */
if (ed->state == ED_IDLE) {
retval = ed_schedule (ohci, ed);
if (retval < 0)
- goto fail;
+ goto fail0;
if (ed->type == PIPE_ISOCHRONOUS) {
u16 frame = OHCI_FRAME_NO(ohci->hcca);
@@ -257,6 +267,8 @@ static int ohci_urb_enqueue (
urb->hcpriv = urb_priv;
td_submit_urb (ohci, urb);
+fail0:
+ spin_unlock (&urb->lock);
fail:
if (retval)
urb_free_priv (ohci, urb_priv);
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
index d1f99bf726e6..2cead07ef548 100644
--- a/drivers/usb/host/ohci-q.c
+++ b/drivers/usb/host/ohci-q.c
@@ -331,19 +331,6 @@ static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed)
periodic_unlink (ohci, ed);
break;
}
-
- /* NOTE: Except for a couple of exceptionally clean unlink cases
- * (like unlinking the only c/b ED, with no TDs) HCs may still be
- * caching this operational ED (or its address). Safe unlinking
- * involves not marking it ED_IDLE till INTR_SF; we always do that
- * if td_list isn't empty. Otherwise the race is small; but ...
- */
- if (ed->state == ED_OPER) {
- ed->state = ED_IDLE;
- ed->hwINFO &= ~(ED_SKIP | ED_DEQUEUE);
- ed->hwHeadP &= ~ED_H;
- wmb ();
- }
}
@@ -665,6 +652,7 @@ static void td_submit_urb (
/* start periodic dma if needed */
if (periodic) {
+ wmb ();
ohci->hc_control |= OHCI_CTRL_PLE|OHCI_CTRL_IE;
writel (ohci->hc_control, &ohci->regs->control);
}
@@ -1053,7 +1041,7 @@ dl_done_list (struct ohci_hcd *ohci, struct td *td, struct pt_regs *regs)
/* clean schedule: unlink EDs that are no longer busy */
if (list_empty (&ed->td_list))
- ed_deschedule (ohci, ed);
+ start_ed_unlink (ohci, ed);
/* ... reenabling halted EDs only after fault cleanup */
else if ((ed->hwINFO & (ED_SKIP | ED_DEQUEUE)) == ED_SKIP) {
td = list_entry (ed->td_list.next, struct td, td_list);
diff --git a/include/linux/init.h b/include/linux/init.h
index 0ab73cff6c48..45069e275b3d 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -110,12 +110,21 @@ struct obs_kernel_param {
};
/* OBSOLETE: see moduleparam.h for the right way. */
-#define __setup(str, fn) \
- static char __setup_str_##fn[] __initdata = str; \
- static struct obs_kernel_param __setup_##fn \
+#define __setup_param(str, unique_id, fn) \
+ static char __setup_str_##unique_id[] __initdata = str; \
+ static struct obs_kernel_param __setup_##unique_id \
__attribute_used__ \
__attribute__((__section__(".init.setup"))) \
- = { __setup_str_##fn, fn }
+ = { __setup_str_##unique_id, fn }
+
+#define __setup_null_param(str, unique_id) \
+ __setup_param(str, unique_id, NULL)
+
+#define __setup(str, fn) \
+ __setup_param(str, fn, fn)
+
+#define __obsolete_setup(str) \
+ __setup_null_param(str, __LINE__)
#endif /* __ASSEMBLY__ */
@@ -172,7 +181,10 @@ struct obs_kernel_param {
{ return exitfn; } \
void cleanup_module(void) __attribute__((alias(#exitfn)));
-#define __setup(str,func) /* nothing */
+#define __setup_param(str, unique_id, fn) /* nothing */
+#define __setup_null_param(str, unique_id) /* nothing */
+#define __setup(str, func) /* nothing */
+#define __obsolete_setup(str) /* nothing */
#endif
/* Data marked not to be saved by software_suspend() */
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index cbca00722b5c..e9d6a16d3fef 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -126,13 +126,16 @@ extern int param_get_invbool(char *buffer, struct kernel_param *kp);
#define param_check_invbool(name, p) __param_check(name, p, int)
/* Comma-separated array: num is set to number they actually specified. */
-#define module_param_array(name, type, num, perm) \
+#define module_param_array_named(name, array, type, num, perm) \
static struct kparam_array __param_arr_##name \
- = { ARRAY_SIZE(name), &num, param_set_##type, param_get_##type, \
- sizeof(name[0]), name }; \
+ = { ARRAY_SIZE(array), &num, param_set_##type, param_get_##type,\
+ sizeof(array[0]), array }; \
module_param_call(name, param_array_set, param_array_get, \
&__param_arr_##name, perm)
+#define module_param_array(name, type, num, perm) \
+ module_param_array_named(name, name, type, num, perm)
+
extern int param_array_set(const char *val, struct kernel_param *kp);
extern int param_array_get(char *buffer, struct kernel_param *kp);
diff --git a/init/main.c b/init/main.c
index 74fce35f2598..820764acf8d6 100644
--- a/init/main.c
+++ b/init/main.c
@@ -155,8 +155,11 @@ static int __init obsolete_checksetup(char *line)
p = &__setup_start;
do {
int n = strlen(p->str);
- if (!strncmp(line,p->str,n)) {
- if (p->setup_func(line+n))
+ if (!strncmp(line, p->str, n)) {
+ if (!p->setup_func) {
+ printk(KERN_WARNING "Parameter %s is obsolete, ignored\n", p->str);
+ return 1;
+ } else if (p->setup_func(line + n))
return 1;
}
p++;
diff --git a/sound/oss/dmasound/dac3550a.c b/sound/oss/dmasound/dac3550a.c
index cb8aa7e7328b..82bc6bfaf253 100644
--- a/sound/oss/dmasound/dac3550a.c
+++ b/sound/oss/dmasound/dac3550a.c
@@ -42,11 +42,6 @@ static int daca_detach_client(struct i2c_client *client);
/* Unique ID allocation */
static int daca_id;
-struct daca_data
-{
- int arf; /* place holder for furture use */
-};
-
struct i2c_driver daca_driver = {
.owner = THIS_MODULE,
.name = "DAC3550A driver V " DACA_VERSION,
@@ -168,12 +163,12 @@ static int daca_detect_client(struct i2c_adapter *adapter, int address)
{
const char *client_name = "DAC 3550A Digital Equalizer";
struct i2c_client *new_client;
- struct daca_data *data;
int rc = -ENODEV;
- new_client = kmalloc(sizeof(*new_client) + sizeof(*data), GFP_KERNEL);
+ new_client = kmalloc(sizeof(*new_client), GFP_KERNEL);
if (!new_client)
return -ENOMEM;
+ memset(new_client, 0, sizeof(*new_client));
new_client->addr = address;
new_client->adapter = adapter;
@@ -182,9 +177,6 @@ static int daca_detect_client(struct i2c_adapter *adapter, int address)
strcpy(new_client->name, client_name);
new_client->id = daca_id++; /* racy... */
- data = (struct daca_data *)(new_client+1);
- dev_set_drvdata(&new_client->dev, data);
-
if (daca_init_client(new_client))
goto bail;