summaryrefslogtreecommitdiff
path: root/drivers/input/joystick/warrior.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@mail.ru>2005-02-04 15:39:25 +0100
committerVojtech Pavlik <vojtech@suse.cz>2005-02-04 15:39:25 +0100
commite122050fef4216632a43bf6ebcaa44c3ad6b07cf (patch)
treee5525272fe8ba4577107d3572f72bbb06799ad33 /drivers/input/joystick/warrior.c
parent8f9ba920e5efff59cff044749a6cae9748f8b6f8 (diff)
Input: replace serio's type field with serio_id structure and
add id_table to serio drivers to split initial matching and probing routines for better sysfs integration and to assist hotplug scripts in loading proper drivers. Add serio_hotplug to notify userspace about new ports. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Diffstat (limited to 'drivers/input/joystick/warrior.c')
-rw-r--r--drivers/input/joystick/warrior.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c
index 3cd2fcccc9ae..bf7995d62eba 100644
--- a/drivers/input/joystick/warrior.c
+++ b/drivers/input/joystick/warrior.c
@@ -148,9 +148,6 @@ static void warrior_connect(struct serio *serio, struct serio_driver *drv)
struct warrior *warrior;
int i;
- if (serio->type != (SERIO_RS232 | SERIO_WARRIOR))
- return;
-
if (!(warrior = kmalloc(sizeof(struct warrior), GFP_KERNEL)))
return;
@@ -202,14 +199,27 @@ static void warrior_connect(struct serio *serio, struct serio_driver *drv)
}
/*
- * The serio device structure.
+ * The serio driver structure.
*/
+static struct serio_device_id warrior_serio_ids[] = {
+ {
+ .type = SERIO_RS232,
+ .proto = SERIO_WARRIOR,
+ .id = SERIO_ANY,
+ .extra = SERIO_ANY,
+ },
+ { 0 }
+};
+
+MODULE_DEVICE_TABLE(serio, warrior_serio_ids);
+
static struct serio_driver warrior_drv = {
.driver = {
.name = "warrior",
},
.description = DRIVER_DESC,
+ .id_table = warrior_serio_ids,
.interrupt = warrior_interrupt,
.connect = warrior_connect,
.disconnect = warrior_disconnect,