summaryrefslogtreecommitdiff
path: root/drivers/input/serio/serio_raw.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/serio/serio_raw.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/serio/serio_raw.c')
-rw-r--r--drivers/input/serio/serio_raw.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c
index 6e9144799034..6da5cea8129c 100644
--- a/drivers/input/serio/serio_raw.c
+++ b/drivers/input/serio/serio_raw.c
@@ -275,9 +275,6 @@ static void serio_raw_connect(struct serio *serio, struct serio_driver *drv)
struct serio_raw *serio_raw;
int err;
- if ((serio->type & SERIO_TYPE) != SERIO_8042)
- return;
-
if (!(serio_raw = kmalloc(sizeof(struct serio_raw), GFP_KERNEL))) {
printk(KERN_ERR "serio_raw.c: can't allocate memory for a device\n");
return;
@@ -363,11 +360,24 @@ static void serio_raw_disconnect(struct serio *serio)
up(&serio_raw_sem);
}
+static struct serio_device_id serio_raw_serio_ids[] = {
+ {
+ .type = SERIO_8042,
+ .proto = SERIO_ANY,
+ .id = SERIO_ANY,
+ .extra = SERIO_ANY,
+ },
+ { 0 }
+};
+
+MODULE_DEVICE_TABLE(serio, serio_raw_serio_ids);
+
static struct serio_driver serio_raw_drv = {
.driver = {
.name = "serio_raw",
},
.description = DRIVER_DESC,
+ .id_table = serio_raw_serio_ids,
.interrupt = serio_raw_interrupt,
.connect = serio_raw_connect,
.reconnect = serio_raw_reconnect,