aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/gscps2.c17
-rw-r--r--drivers/input/serio/hil_mlc.c14
-rw-r--r--drivers/input/serio/hp_sdc.c8
-rw-r--r--drivers/input/serio/i8042.c13
4 files changed, 27 insertions, 25 deletions
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c
index 897e4c12b642..a7b0de0f92b2 100644
--- a/drivers/input/serio/gscps2.c
+++ b/drivers/input/serio/gscps2.c
@@ -211,9 +211,6 @@ static void gscps2_reset(struct gscps2port *ps2port)
211 writeb(0xff, addr+GSC_RESET); 211 writeb(0xff, addr+GSC_RESET);
212 gscps2_flush(ps2port); 212 gscps2_flush(ps2port);
213 spin_unlock_irqrestore(&ps2port->lock, flags); 213 spin_unlock_irqrestore(&ps2port->lock, flags);
214
215 /* enable it */
216 gscps2_enable(ps2port, ENABLE);
217} 214}
218 215
219static LIST_HEAD(ps2port_list); 216static LIST_HEAD(ps2port_list);
@@ -307,6 +304,9 @@ static int gscps2_open(struct serio *port)
307 304
308 gscps2_reset(ps2port); 305 gscps2_reset(ps2port);
309 306
307 /* enable it */
308 gscps2_enable(ps2port, ENABLE);
309
310 gscps2_interrupt(0, NULL, NULL); 310 gscps2_interrupt(0, NULL, NULL);
311 311
312 return 0; 312 return 0;
@@ -331,7 +331,7 @@ static int __init gscps2_probe(struct parisc_device *dev)
331{ 331{
332 struct gscps2port *ps2port; 332 struct gscps2port *ps2port;
333 struct serio *serio; 333 struct serio *serio;
334 unsigned long hpa = dev->hpa; 334 unsigned long hpa = dev->hpa.start;
335 int ret; 335 int ret;
336 336
337 if (!dev->irq) 337 if (!dev->irq)
@@ -370,8 +370,6 @@ static int __init gscps2_probe(struct parisc_device *dev)
370 serio->port_data = ps2port; 370 serio->port_data = ps2port;
371 serio->dev.parent = &dev->dev; 371 serio->dev.parent = &dev->dev;
372 372
373 list_add_tail(&ps2port->node, &ps2port_list);
374
375 ret = -EBUSY; 373 ret = -EBUSY;
376 if (request_irq(dev->irq, gscps2_interrupt, SA_SHIRQ, ps2port->port->name, ps2port)) 374 if (request_irq(dev->irq, gscps2_interrupt, SA_SHIRQ, ps2port->port->name, ps2port))
377 goto fail_miserably; 375 goto fail_miserably;
@@ -396,15 +394,16 @@ static int __init gscps2_probe(struct parisc_device *dev)
396 394
397 serio_register_port(ps2port->port); 395 serio_register_port(ps2port->port);
398 396
397 list_add_tail(&ps2port->node, &ps2port_list);
398
399 return 0; 399 return 0;
400 400
401fail: 401fail:
402 free_irq(dev->irq, ps2port); 402 free_irq(dev->irq, ps2port);
403 403
404fail_miserably: 404fail_miserably:
405 list_del(&ps2port->node);
406 iounmap(ps2port->addr); 405 iounmap(ps2port->addr);
407 release_mem_region(dev->hpa, GSC_STATUS + 4); 406 release_mem_region(dev->hpa.start, GSC_STATUS + 4);
408 407
409fail_nomem: 408fail_nomem:
410 kfree(ps2port); 409 kfree(ps2port);
@@ -444,7 +443,7 @@ static struct parisc_device_id gscps2_device_tbl[] = {
444}; 443};
445 444
446static struct parisc_driver parisc_ps2_driver = { 445static struct parisc_driver parisc_ps2_driver = {
447 .name = "GSC PS2", 446 .name = "gsc_ps2",
448 .id_table = gscps2_device_tbl, 447 .id_table = gscps2_device_tbl,
449 .probe = gscps2_probe, 448 .probe = gscps2_probe,
450 .remove = gscps2_remove, 449 .remove = gscps2_remove,
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
841static 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
840int hil_mlc_register(hil_mlc *mlc) { 848int 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;
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c
index 7629452dd64b..a10348bb25e9 100644
--- a/drivers/input/serio/hp_sdc.c
+++ b/drivers/input/serio/hp_sdc.c
@@ -764,7 +764,7 @@ MODULE_DEVICE_TABLE(parisc, hp_sdc_tbl);
764static int __init hp_sdc_init_hppa(struct parisc_device *d); 764static int __init hp_sdc_init_hppa(struct parisc_device *d);
765 765
766static struct parisc_driver hp_sdc_driver = { 766static struct parisc_driver hp_sdc_driver = {
767 .name = "HP SDC", 767 .name = "hp_sdc",
768 .id_table = hp_sdc_tbl, 768 .id_table = hp_sdc_tbl,
769 .probe = hp_sdc_init_hppa, 769 .probe = hp_sdc_init_hppa,
770}; 770};
@@ -875,9 +875,9 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d)
875 hp_sdc.dev = d; 875 hp_sdc.dev = d;
876 hp_sdc.irq = d->irq; 876 hp_sdc.irq = d->irq;
877 hp_sdc.nmi = d->aux_irq; 877 hp_sdc.nmi = d->aux_irq;
878 hp_sdc.base_io = d->hpa; 878 hp_sdc.base_io = d->hpa.start;
879 hp_sdc.data_io = d->hpa + 0x800; 879 hp_sdc.data_io = d->hpa.start + 0x800;
880 hp_sdc.status_io = d->hpa + 0x801; 880 hp_sdc.status_io = d->hpa.start + 0x801;
881 881
882 return hp_sdc_init(); 882 return hp_sdc_init();
883} 883}
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 40d451ce07ff..4bc40f159996 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -911,12 +911,10 @@ static long i8042_panic_blink(long count)
911 * Here we try to restore the original BIOS settings 911 * Here we try to restore the original BIOS settings
912 */ 912 */
913 913
914static int i8042_suspend(struct device *dev, pm_message_t state, u32 level) 914static int i8042_suspend(struct device *dev, pm_message_t state)
915{ 915{
916 if (level == SUSPEND_DISABLE) { 916 del_timer_sync(&i8042_timer);
917 del_timer_sync(&i8042_timer); 917 i8042_controller_reset();
918 i8042_controller_reset();
919 }
920 918
921 return 0; 919 return 0;
922} 920}
@@ -926,13 +924,10 @@ static int i8042_suspend(struct device *dev, pm_message_t state, u32 level)
926 * Here we try to reset everything back to a state in which suspended 924 * Here we try to reset everything back to a state in which suspended
927 */ 925 */
928 926
929static int i8042_resume(struct device *dev, u32 level) 927static int i8042_resume(struct device *dev)
930{ 928{
931 int i; 929 int i;
932 930
933 if (level != RESUME_ENABLE)
934 return 0;
935
936 if (i8042_ctl_test()) 931 if (i8042_ctl_test())
937 return -1; 932 return -1;
938 933