diff options
Diffstat (limited to 'drivers/input/serio/hil_mlc.c')
-rw-r--r-- | drivers/input/serio/hil_mlc.c | 14 |
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) { | |||
801 | struct hil_mlc_serio_map *map; | 801 | struct hil_mlc_serio_map *map; |
802 | struct hil_mlc *mlc; | 802 | struct hil_mlc *mlc; |
803 | 803 | ||
804 | if (serio->private != NULL) return -EBUSY; | 804 | if (serio_get_drvdata(serio) != NULL) |
805 | return -EBUSY; | ||
805 | 806 | ||
806 | map = serio->port_data; | 807 | map = serio->port_data; |
807 | if (map == NULL) { | 808 | if (map == NULL) { |
@@ -832,11 +833,18 @@ static void hil_mlc_serio_close(struct serio *serio) { | |||
832 | return; | 833 | return; |
833 | } | 834 | } |
834 | 835 | ||
835 | serio->private = NULL; | 836 | serio_set_drvdata(serio, NULL); |
836 | serio->drv = NULL; | 837 | serio->drv = NULL; |
837 | /* TODO wake up interruptable */ | 838 | /* TODO wake up interruptable */ |
838 | } | 839 | } |
839 | 840 | ||
841 | static struct serio_device_id hil_mlc_serio_id = { | ||
842 | .type = SERIO_HIL_MLC, | ||
843 | .proto = SERIO_HIL, | ||
844 | .extra = SERIO_ANY, | ||
845 | .id = SERIO_ANY, | ||
846 | }; | ||
847 | |||
840 | int hil_mlc_register(hil_mlc *mlc) { | 848 | int hil_mlc_register(hil_mlc *mlc) { |
841 | int i; | 849 | int i; |
842 | unsigned long flags; | 850 | unsigned long flags; |
@@ -867,7 +875,7 @@ int hil_mlc_register(hil_mlc *mlc) { | |||
867 | mlc_serio = kmalloc(sizeof(*mlc_serio), GFP_KERNEL); | 875 | mlc_serio = kmalloc(sizeof(*mlc_serio), GFP_KERNEL); |
868 | mlc->serio[i] = mlc_serio; | 876 | mlc->serio[i] = mlc_serio; |
869 | memset(mlc_serio, 0, sizeof(*mlc_serio)); | 877 | memset(mlc_serio, 0, sizeof(*mlc_serio)); |
870 | mlc_serio->type = SERIO_HIL | SERIO_HIL_MLC; | 878 | mlc_serio->id = hil_mlc_serio_id; |
871 | mlc_serio->write = hil_mlc_serio_write; | 879 | mlc_serio->write = hil_mlc_serio_write; |
872 | mlc_serio->open = hil_mlc_serio_open; | 880 | mlc_serio->open = hil_mlc_serio_open; |
873 | mlc_serio->close = hil_mlc_serio_close; | 881 | mlc_serio->close = hil_mlc_serio_close; |