aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/i8042-sparcio.h6
-rw-r--r--drivers/input/serio/serio.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
index 54adba2d8ed5..d9ca55891cd7 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -16,6 +16,7 @@ static int i8042_aux_irq = -1;
16#define I8042_MUX_PHYS_DESC "sparcps2/serio%d" 16#define I8042_MUX_PHYS_DESC "sparcps2/serio%d"
17 17
18static void __iomem *kbd_iobase; 18static void __iomem *kbd_iobase;
19static struct resource *kbd_res;
19 20
20#define I8042_COMMAND_REG (kbd_iobase + 0x64UL) 21#define I8042_COMMAND_REG (kbd_iobase + 0x64UL)
21#define I8042_DATA_REG (kbd_iobase + 0x60UL) 22#define I8042_DATA_REG (kbd_iobase + 0x60UL)
@@ -60,6 +61,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
60 i8042_kbd_irq = irq; 61 i8042_kbd_irq = irq;
61 kbd_iobase = of_ioremap(&kbd->resource[0], 62 kbd_iobase = of_ioremap(&kbd->resource[0],
62 0, 8, "kbd"); 63 0, 8, "kbd");
64 kbd_res = &kbd->resource[0];
63 } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) || 65 } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) ||
64 !strcmp(dp->name, OBP_PS2MS_NAME2)) { 66 !strcmp(dp->name, OBP_PS2MS_NAME2)) {
65 struct of_device *ms = of_find_device_by_node(dp); 67 struct of_device *ms = of_find_device_by_node(dp);
@@ -77,7 +79,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
77 79
78static int __devexit sparc_i8042_remove(struct of_device *op) 80static int __devexit sparc_i8042_remove(struct of_device *op)
79{ 81{
80 of_iounmap(kbd_iobase, 8); 82 of_iounmap(kbd_res, kbd_iobase, 8);
81 83
82 return 0; 84 return 0;
83} 85}
@@ -119,7 +121,7 @@ static int __init i8042_platform_init(void)
119 if (i8042_kbd_irq == -1 || 121 if (i8042_kbd_irq == -1 ||
120 i8042_aux_irq == -1) { 122 i8042_aux_irq == -1) {
121 if (kbd_iobase) { 123 if (kbd_iobase) {
122 of_iounmap(kbd_iobase, 8); 124 of_iounmap(kbd_res, kbd_iobase, 8);
123 kbd_iobase = (void __iomem *) NULL; 125 kbd_iobase = (void __iomem *) NULL;
124 } 126 }
125 return -ENODEV; 127 return -ENODEV;
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index f0ce822c1028..17c8c63cbe1a 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -45,7 +45,7 @@ EXPORT_SYMBOL(serio_interrupt);
45EXPORT_SYMBOL(__serio_register_port); 45EXPORT_SYMBOL(__serio_register_port);
46EXPORT_SYMBOL(serio_unregister_port); 46EXPORT_SYMBOL(serio_unregister_port);
47EXPORT_SYMBOL(serio_unregister_child_port); 47EXPORT_SYMBOL(serio_unregister_child_port);
48EXPORT_SYMBOL(serio_register_driver); 48EXPORT_SYMBOL(__serio_register_driver);
49EXPORT_SYMBOL(serio_unregister_driver); 49EXPORT_SYMBOL(serio_unregister_driver);
50EXPORT_SYMBOL(serio_open); 50EXPORT_SYMBOL(serio_open);
51EXPORT_SYMBOL(serio_close); 51EXPORT_SYMBOL(serio_close);
@@ -789,12 +789,14 @@ static void serio_attach_driver(struct serio_driver *drv)
789 drv->driver.name, error); 789 drv->driver.name, error);
790} 790}
791 791
792int serio_register_driver(struct serio_driver *drv) 792int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name)
793{ 793{
794 int manual_bind = drv->manual_bind; 794 int manual_bind = drv->manual_bind;
795 int error; 795 int error;
796 796
797 drv->driver.bus = &serio_bus; 797 drv->driver.bus = &serio_bus;
798 drv->driver.owner = owner;
799 drv->driver.mod_name = mod_name;
798 800
799 /* 801 /*
800 * Temporarily disable automatic binding because probing 802 * Temporarily disable automatic binding because probing