summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/hil_mlc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 19:08:46 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 19:08:46 +0200
commit8ed575904373d7aaab7f15a8db2edc317a44df43 (patch)
tree3b2e92a396a1bbec8e1fb499f25e8aed93ab5692 /drivers/input/serio/hil_mlc.c
parentMerge master.kernel.org:/home/rmk/linux-2.6-mmc (diff)
parentAuto-update from upstream (diff)
downloadlinux-8ed575904373d7aaab7f15a8db2edc317a44df43.tar.xz
linux-8ed575904373d7aaab7f15a8db2edc317a44df43.zip
Merge branch 'forlinus' of git://parisc-linux.org/home/kyle/git/parisc-2.6
Diffstat (limited to 'drivers/input/serio/hil_mlc.c')
-rw-r--r--drivers/input/serio/hil_mlc.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c
index c243cb6fdfc4..5704204964a3 100644
--- a/drivers/input/serio/hil_mlc.c
+++ b/drivers/input/serio/hil_mlc.c
@@ -801,7 +801,8 @@ static int hil_mlc_serio_open(struct serio *serio) {
struct hil_mlc_serio_map *map;
struct hil_mlc *mlc;
- if (serio->private != NULL) return -EBUSY;
+ if (serio_get_drvdata(serio) != NULL)
+ return -EBUSY;
map = serio->port_data;
if (map == NULL) {
@@ -832,11 +833,18 @@ static void hil_mlc_serio_close(struct serio *serio) {
return;
}
- serio->private = NULL;
+ serio_set_drvdata(serio, NULL);
serio->drv = NULL;
/* TODO wake up interruptable */
}
+static struct serio_device_id hil_mlc_serio_id = {
+ .type = SERIO_HIL_MLC,
+ .proto = SERIO_HIL,
+ .extra = SERIO_ANY,
+ .id = SERIO_ANY,
+};
+
int hil_mlc_register(hil_mlc *mlc) {
int i;
unsigned long flags;
@@ -867,7 +875,7 @@ int hil_mlc_register(hil_mlc *mlc) {
mlc_serio = kmalloc(sizeof(*mlc_serio), GFP_KERNEL);
mlc->serio[i] = mlc_serio;
memset(mlc_serio, 0, sizeof(*mlc_serio));
- mlc_serio->type = SERIO_HIL | SERIO_HIL_MLC;
+ mlc_serio->id = hil_mlc_serio_id;
mlc_serio->write = hil_mlc_serio_write;
mlc_serio->open = hil_mlc_serio_open;
mlc_serio->close = hil_mlc_serio_close;