diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/serio/i8042-sparcio.h | 6 |
1 files changed, 4 insertions, 2 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 | ||
18 | static void __iomem *kbd_iobase; | 18 | static void __iomem *kbd_iobase; |
19 | static 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 | ||
78 | static int __devexit sparc_i8042_remove(struct of_device *op) | 80 | static 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; |