diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-12-17 01:04:14 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-12-17 01:04:14 -0500 |
commit | 022573c275500e1a50889949f679d04b5446edf6 (patch) | |
tree | 766ab0e13fc38275466f8544d1bbf4982833cbff /drivers/input/serio | |
parent | 516d798f656614f59553b1ff3592c2c36102b684 (diff) | |
parent | a455e2985f57e2a71566bb8850094af38b2c932d (diff) |
Merge branch 'next' into for-linus
Prepare first set of updates for 3.8 merge window.
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/Kconfig | 9 | ||||
-rw-r--r-- | drivers/input/serio/Makefile | 1 | ||||
-rw-r--r-- | drivers/input/serio/altera_ps2.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/ambakmi.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/arc_ps2.c | 274 | ||||
-rw-r--r-- | drivers/input/serio/ct82c710.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/gscps2.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/hil_mlc.c | 13 | ||||
-rw-r--r-- | drivers/input/serio/i8042-io.h | 2 | ||||
-rw-r--r-- | drivers/input/serio/i8042-sparcio.h | 6 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/maceps2.c | 8 | ||||
-rw-r--r-- | drivers/input/serio/pcips2.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/q40kbd.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/rpckbd.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/sa1111ps2.c | 12 | ||||
-rw-r--r-- | drivers/input/serio/serio.c | 11 | ||||
-rw-r--r-- | drivers/input/serio/xilinx_ps2.c | 8 |
18 files changed, 331 insertions, 61 deletions
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index 55f2c2293ec..4a4e182c33e 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
@@ -234,4 +234,13 @@ config SERIO_PS2MULT | |||
234 | To compile this driver as a module, choose M here: the | 234 | To compile this driver as a module, choose M here: the |
235 | module will be called ps2mult. | 235 | module will be called ps2mult. |
236 | 236 | ||
237 | config SERIO_ARC_PS2 | ||
238 | tristate "ARC PS/2 support" | ||
239 | help | ||
240 | Say Y here if you have an ARC FPGA platform with a PS/2 | ||
241 | controller in it. | ||
242 | |||
243 | To compile this driver as a module, choose M here; the module | ||
244 | will be called arc_ps2. | ||
245 | |||
237 | endif | 246 | endif |
diff --git a/drivers/input/serio/Makefile b/drivers/input/serio/Makefile index dbbe37616c9..4b0c8f84f1c 100644 --- a/drivers/input/serio/Makefile +++ b/drivers/input/serio/Makefile | |||
@@ -25,3 +25,4 @@ obj-$(CONFIG_SERIO_RAW) += serio_raw.o | |||
25 | obj-$(CONFIG_SERIO_AMS_DELTA) += ams_delta_serio.o | 25 | obj-$(CONFIG_SERIO_AMS_DELTA) += ams_delta_serio.o |
26 | obj-$(CONFIG_SERIO_XILINX_XPS_PS2) += xilinx_ps2.o | 26 | obj-$(CONFIG_SERIO_XILINX_XPS_PS2) += xilinx_ps2.o |
27 | obj-$(CONFIG_SERIO_ALTERA_PS2) += altera_ps2.o | 27 | obj-$(CONFIG_SERIO_ALTERA_PS2) += altera_ps2.o |
28 | obj-$(CONFIG_SERIO_ARC_PS2) += arc_ps2.o | ||
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c index cc11f4efe11..479ce5fe895 100644 --- a/drivers/input/serio/altera_ps2.c +++ b/drivers/input/serio/altera_ps2.c | |||
@@ -81,7 +81,7 @@ static void altera_ps2_close(struct serio *io) | |||
81 | /* | 81 | /* |
82 | * Add one device to this driver. | 82 | * Add one device to this driver. |
83 | */ | 83 | */ |
84 | static int __devinit altera_ps2_probe(struct platform_device *pdev) | 84 | static int altera_ps2_probe(struct platform_device *pdev) |
85 | { | 85 | { |
86 | struct ps2if *ps2if; | 86 | struct ps2if *ps2if; |
87 | struct serio *serio; | 87 | struct serio *serio; |
@@ -159,7 +159,7 @@ static int __devinit altera_ps2_probe(struct platform_device *pdev) | |||
159 | /* | 159 | /* |
160 | * Remove one device from this driver. | 160 | * Remove one device from this driver. |
161 | */ | 161 | */ |
162 | static int __devexit altera_ps2_remove(struct platform_device *pdev) | 162 | static int altera_ps2_remove(struct platform_device *pdev) |
163 | { | 163 | { |
164 | struct ps2if *ps2if = platform_get_drvdata(pdev); | 164 | struct ps2if *ps2if = platform_get_drvdata(pdev); |
165 | 165 | ||
@@ -187,7 +187,7 @@ MODULE_DEVICE_TABLE(of, altera_ps2_match); | |||
187 | */ | 187 | */ |
188 | static struct platform_driver altera_ps2_driver = { | 188 | static struct platform_driver altera_ps2_driver = { |
189 | .probe = altera_ps2_probe, | 189 | .probe = altera_ps2_probe, |
190 | .remove = __devexit_p(altera_ps2_remove), | 190 | .remove = altera_ps2_remove, |
191 | .driver = { | 191 | .driver = { |
192 | .name = DRV_NAME, | 192 | .name = DRV_NAME, |
193 | .owner = THIS_MODULE, | 193 | .owner = THIS_MODULE, |
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 2e77246c2e5..4e2fd44865e 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c | |||
@@ -107,7 +107,7 @@ static void amba_kmi_close(struct serio *io) | |||
107 | clk_disable_unprepare(kmi->clk); | 107 | clk_disable_unprepare(kmi->clk); |
108 | } | 108 | } |
109 | 109 | ||
110 | static int __devinit amba_kmi_probe(struct amba_device *dev, | 110 | static int amba_kmi_probe(struct amba_device *dev, |
111 | const struct amba_id *id) | 111 | const struct amba_id *id) |
112 | { | 112 | { |
113 | struct amba_kmi_port *kmi; | 113 | struct amba_kmi_port *kmi; |
@@ -163,7 +163,7 @@ static int __devinit amba_kmi_probe(struct amba_device *dev, | |||
163 | return ret; | 163 | return ret; |
164 | } | 164 | } |
165 | 165 | ||
166 | static int __devexit amba_kmi_remove(struct amba_device *dev) | 166 | static int amba_kmi_remove(struct amba_device *dev) |
167 | { | 167 | { |
168 | struct amba_kmi_port *kmi = amba_get_drvdata(dev); | 168 | struct amba_kmi_port *kmi = amba_get_drvdata(dev); |
169 | 169 | ||
@@ -204,7 +204,7 @@ static struct amba_driver ambakmi_driver = { | |||
204 | }, | 204 | }, |
205 | .id_table = amba_kmi_idtable, | 205 | .id_table = amba_kmi_idtable, |
206 | .probe = amba_kmi_probe, | 206 | .probe = amba_kmi_probe, |
207 | .remove = __devexit_p(amba_kmi_remove), | 207 | .remove = amba_kmi_remove, |
208 | .resume = amba_kmi_resume, | 208 | .resume = amba_kmi_resume, |
209 | }; | 209 | }; |
210 | 210 | ||
diff --git a/drivers/input/serio/arc_ps2.c b/drivers/input/serio/arc_ps2.c new file mode 100644 index 00000000000..b571eb3e4ef --- /dev/null +++ b/drivers/input/serio/arc_ps2.c | |||
@@ -0,0 +1,274 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * Driver is originally developed by Pavel Sokolov <psokolov@synopsys.com> | ||
9 | */ | ||
10 | |||
11 | #include <linux/module.h> | ||
12 | #include <linux/interrupt.h> | ||
13 | #include <linux/input.h> | ||
14 | #include <linux/serio.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/slab.h> | ||
19 | |||
20 | #define ARC_PS2_PORTS 2 | ||
21 | |||
22 | #define ARC_ARC_PS2_ID 0x0001f609 | ||
23 | |||
24 | #define STAT_TIMEOUT 128 | ||
25 | |||
26 | #define PS2_STAT_RX_FRM_ERR (1) | ||
27 | #define PS2_STAT_RX_BUF_OVER (1 << 1) | ||
28 | #define PS2_STAT_RX_INT_EN (1 << 2) | ||
29 | #define PS2_STAT_RX_VAL (1 << 3) | ||
30 | #define PS2_STAT_TX_ISNOT_FUL (1 << 4) | ||
31 | #define PS2_STAT_TX_INT_EN (1 << 5) | ||
32 | |||
33 | struct arc_ps2_port { | ||
34 | void __iomem *data_addr; | ||
35 | void __iomem *status_addr; | ||
36 | struct serio *io; | ||
37 | }; | ||
38 | |||
39 | struct arc_ps2_data { | ||
40 | struct arc_ps2_port port[ARC_PS2_PORTS]; | ||
41 | void __iomem *addr; | ||
42 | unsigned int frame_error; | ||
43 | unsigned int buf_overflow; | ||
44 | unsigned int total_int; | ||
45 | }; | ||
46 | |||
47 | static void arc_ps2_check_rx(struct arc_ps2_data *arc_ps2, | ||
48 | struct arc_ps2_port *port) | ||
49 | { | ||
50 | unsigned int timeout = 1000; | ||
51 | unsigned int flag, status; | ||
52 | unsigned char data; | ||
53 | |||
54 | do { | ||
55 | status = ioread32(port->status_addr); | ||
56 | if (!(status & PS2_STAT_RX_VAL)) | ||
57 | return; | ||
58 | |||
59 | data = ioread32(port->data_addr) & 0xff; | ||
60 | |||
61 | flag = 0; | ||
62 | arc_ps2->total_int++; | ||
63 | if (status & PS2_STAT_RX_FRM_ERR) { | ||
64 | arc_ps2->frame_error++; | ||
65 | flag |= SERIO_PARITY; | ||
66 | } else if (status & PS2_STAT_RX_BUF_OVER) { | ||
67 | arc_ps2->buf_overflow++; | ||
68 | flag |= SERIO_FRAME; | ||
69 | } | ||
70 | |||
71 | serio_interrupt(port->io, data, flag); | ||
72 | } while (--timeout); | ||
73 | |||
74 | dev_err(&port->io->dev, "PS/2 hardware stuck\n"); | ||
75 | } | ||
76 | |||
77 | static irqreturn_t arc_ps2_interrupt(int irq, void *dev) | ||
78 | { | ||
79 | struct arc_ps2_data *arc_ps2 = dev; | ||
80 | int i; | ||
81 | |||
82 | for (i = 0; i < ARC_PS2_PORTS; i++) | ||
83 | arc_ps2_check_rx(arc_ps2, &arc_ps2->port[i]); | ||
84 | |||
85 | return IRQ_HANDLED; | ||
86 | } | ||
87 | |||
88 | static int arc_ps2_write(struct serio *io, unsigned char val) | ||
89 | { | ||
90 | unsigned status; | ||
91 | struct arc_ps2_port *port = io->port_data; | ||
92 | int timeout = STAT_TIMEOUT; | ||
93 | |||
94 | do { | ||
95 | status = ioread32(port->status_addr); | ||
96 | cpu_relax(); | ||
97 | |||
98 | if (status & PS2_STAT_TX_ISNOT_FUL) { | ||
99 | iowrite32(val & 0xff, port->data_addr); | ||
100 | return 0; | ||
101 | } | ||
102 | |||
103 | } while (--timeout); | ||
104 | |||
105 | dev_err(&io->dev, "write timeout\n"); | ||
106 | return -ETIMEDOUT; | ||
107 | } | ||
108 | |||
109 | static int arc_ps2_open(struct serio *io) | ||
110 | { | ||
111 | struct arc_ps2_port *port = io->port_data; | ||
112 | |||
113 | iowrite32(PS2_STAT_RX_INT_EN, port->status_addr); | ||
114 | |||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | static void arc_ps2_close(struct serio *io) | ||
119 | { | ||
120 | struct arc_ps2_port *port = io->port_data; | ||
121 | |||
122 | iowrite32(ioread32(port->status_addr) & ~PS2_STAT_RX_INT_EN, | ||
123 | port->status_addr); | ||
124 | } | ||
125 | |||
126 | static void __iomem *arc_ps2_calc_addr(struct arc_ps2_data *arc_ps2, | ||
127 | int index, bool status) | ||
128 | { | ||
129 | void __iomem *addr; | ||
130 | |||
131 | addr = arc_ps2->addr + 4 + 4 * index; | ||
132 | if (status) | ||
133 | addr += ARC_PS2_PORTS * 4; | ||
134 | |||
135 | return addr; | ||
136 | } | ||
137 | |||
138 | static void arc_ps2_inhibit_ports(struct arc_ps2_data *arc_ps2) | ||
139 | { | ||
140 | void __iomem *addr; | ||
141 | u32 val; | ||
142 | int i; | ||
143 | |||
144 | for (i = 0; i < ARC_PS2_PORTS; i++) { | ||
145 | addr = arc_ps2_calc_addr(arc_ps2, i, true); | ||
146 | val = ioread32(addr); | ||
147 | val &= ~(PS2_STAT_RX_INT_EN | PS2_STAT_TX_INT_EN); | ||
148 | iowrite32(val, addr); | ||
149 | } | ||
150 | } | ||
151 | |||
152 | static int arc_ps2_create_port(struct platform_device *pdev, | ||
153 | struct arc_ps2_data *arc_ps2, | ||
154 | int index) | ||
155 | { | ||
156 | struct arc_ps2_port *port = &arc_ps2->port[index]; | ||
157 | struct serio *io; | ||
158 | |||
159 | io = kzalloc(sizeof(struct serio), GFP_KERNEL); | ||
160 | if (!io) | ||
161 | return -ENOMEM; | ||
162 | |||
163 | io->id.type = SERIO_8042; | ||
164 | io->write = arc_ps2_write; | ||
165 | io->open = arc_ps2_open; | ||
166 | io->close = arc_ps2_close; | ||
167 | snprintf(io->name, sizeof(io->name), "ARC PS/2 port%d", index); | ||
168 | snprintf(io->phys, sizeof(io->phys), "arc/serio%d", index); | ||
169 | io->port_data = port; | ||
170 | |||
171 | port->io = io; | ||
172 | |||
173 | port->data_addr = arc_ps2_calc_addr(arc_ps2, index, false); | ||
174 | port->status_addr = arc_ps2_calc_addr(arc_ps2, index, true); | ||
175 | |||
176 | dev_dbg(&pdev->dev, "port%d is allocated (data = 0x%p, status = 0x%p)\n", | ||
177 | index, port->data_addr, port->status_addr); | ||
178 | |||
179 | serio_register_port(port->io); | ||
180 | return 0; | ||
181 | } | ||
182 | |||
183 | static int arc_ps2_probe(struct platform_device *pdev) | ||
184 | { | ||
185 | struct arc_ps2_data *arc_ps2; | ||
186 | struct resource *res; | ||
187 | int irq; | ||
188 | int error, id, i; | ||
189 | |||
190 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
191 | if (!res) { | ||
192 | dev_err(&pdev->dev, "no IO memory defined\n"); | ||
193 | return -EINVAL; | ||
194 | } | ||
195 | |||
196 | irq = platform_get_irq_byname(pdev, "arc_ps2_irq"); | ||
197 | if (irq < 0) { | ||
198 | dev_err(&pdev->dev, "no IRQ defined\n"); | ||
199 | return -EINVAL; | ||
200 | } | ||
201 | |||
202 | arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data), | ||
203 | GFP_KERNEL); | ||
204 | if (!arc_ps2) { | ||
205 | dev_err(&pdev->dev, "out of memory\n"); | ||
206 | return -ENOMEM; | ||
207 | } | ||
208 | |||
209 | arc_ps2->addr = devm_request_and_ioremap(&pdev->dev, res); | ||
210 | if (!arc_ps2->addr) | ||
211 | return -EBUSY; | ||
212 | |||
213 | dev_info(&pdev->dev, "irq = %d, address = 0x%p, ports = %i\n", | ||
214 | irq, arc_ps2->addr, ARC_PS2_PORTS); | ||
215 | |||
216 | id = ioread32(arc_ps2->addr); | ||
217 | if (id != ARC_ARC_PS2_ID) { | ||
218 | dev_err(&pdev->dev, "device id does not match\n"); | ||
219 | return -ENXIO; | ||
220 | } | ||
221 | |||
222 | arc_ps2_inhibit_ports(arc_ps2); | ||
223 | |||
224 | error = devm_request_irq(&pdev->dev, irq, arc_ps2_interrupt, | ||
225 | 0, "arc_ps2", arc_ps2); | ||
226 | if (error) { | ||
227 | dev_err(&pdev->dev, "Could not allocate IRQ\n"); | ||
228 | return error; | ||
229 | } | ||
230 | |||
231 | for (i = 0; i < ARC_PS2_PORTS; i++) { | ||
232 | error = arc_ps2_create_port(pdev, arc_ps2, i); | ||
233 | if (error) { | ||
234 | while (--i >= 0) | ||
235 | serio_unregister_port(arc_ps2->port[i].io); | ||
236 | return error; | ||
237 | } | ||
238 | } | ||
239 | |||
240 | platform_set_drvdata(pdev, arc_ps2); | ||
241 | |||
242 | return 0; | ||
243 | } | ||
244 | |||
245 | static int arc_ps2_remove(struct platform_device *pdev) | ||
246 | { | ||
247 | struct arc_ps2_data *arc_ps2 = platform_get_drvdata(pdev); | ||
248 | int i; | ||
249 | |||
250 | for (i = 0; i < ARC_PS2_PORTS; i++) | ||
251 | serio_unregister_port(arc_ps2->port[i].io); | ||
252 | |||
253 | dev_dbg(&pdev->dev, "interrupt count = %i\n", arc_ps2->total_int); | ||
254 | dev_dbg(&pdev->dev, "frame error count = %i\n", arc_ps2->frame_error); | ||
255 | dev_dbg(&pdev->dev, "buffer overflow count = %i\n", | ||
256 | arc_ps2->buf_overflow); | ||
257 | |||
258 | return 0; | ||
259 | } | ||
260 | |||
261 | static struct platform_driver arc_ps2_driver = { | ||
262 | .driver = { | ||
263 | .name = "arc_ps2", | ||
264 | .owner = THIS_MODULE, | ||
265 | }, | ||
266 | .probe = arc_ps2_probe, | ||
267 | .remove = arc_ps2_remove, | ||
268 | }; | ||
269 | |||
270 | module_platform_driver(arc_ps2_driver); | ||
271 | |||
272 | MODULE_LICENSE("GPL"); | ||
273 | MODULE_AUTHOR("Pavel Sokolov <psokolov@synopsys.com>"); | ||
274 | MODULE_DESCRIPTION("ARC PS/2 Driver"); | ||
diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c index 85281656724..cfe549d4eaa 100644 --- a/drivers/input/serio/ct82c710.c +++ b/drivers/input/serio/ct82c710.c | |||
@@ -175,7 +175,7 @@ static int __init ct82c710_detect(void) | |||
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | 177 | ||
178 | static int __devinit ct82c710_probe(struct platform_device *dev) | 178 | static int ct82c710_probe(struct platform_device *dev) |
179 | { | 179 | { |
180 | ct82c710_port = kzalloc(sizeof(struct serio), GFP_KERNEL); | 180 | ct82c710_port = kzalloc(sizeof(struct serio), GFP_KERNEL); |
181 | if (!ct82c710_port) | 181 | if (!ct82c710_port) |
@@ -199,7 +199,7 @@ static int __devinit ct82c710_probe(struct platform_device *dev) | |||
199 | return 0; | 199 | return 0; |
200 | } | 200 | } |
201 | 201 | ||
202 | static int __devexit ct82c710_remove(struct platform_device *dev) | 202 | static int ct82c710_remove(struct platform_device *dev) |
203 | { | 203 | { |
204 | serio_unregister_port(ct82c710_port); | 204 | serio_unregister_port(ct82c710_port); |
205 | 205 | ||
@@ -212,7 +212,7 @@ static struct platform_driver ct82c710_driver = { | |||
212 | .owner = THIS_MODULE, | 212 | .owner = THIS_MODULE, |
213 | }, | 213 | }, |
214 | .probe = ct82c710_probe, | 214 | .probe = ct82c710_probe, |
215 | .remove = __devexit_p(ct82c710_remove), | 215 | .remove = ct82c710_remove, |
216 | }; | 216 | }; |
217 | 217 | ||
218 | 218 | ||
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index 4225f5d6b15..8d9ba0c3827 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c | |||
@@ -327,7 +327,7 @@ static void gscps2_close(struct serio *port) | |||
327 | * @return: success/error report | 327 | * @return: success/error report |
328 | */ | 328 | */ |
329 | 329 | ||
330 | static int __devinit gscps2_probe(struct parisc_device *dev) | 330 | static int gscps2_probe(struct parisc_device *dev) |
331 | { | 331 | { |
332 | struct gscps2port *ps2port; | 332 | struct gscps2port *ps2port; |
333 | struct serio *serio; | 333 | struct serio *serio; |
@@ -414,7 +414,7 @@ fail_nomem: | |||
414 | * @return: success/error report | 414 | * @return: success/error report |
415 | */ | 415 | */ |
416 | 416 | ||
417 | static int __devexit gscps2_remove(struct parisc_device *dev) | 417 | static int gscps2_remove(struct parisc_device *dev) |
418 | { | 418 | { |
419 | struct gscps2port *ps2port = dev_get_drvdata(&dev->dev); | 419 | struct gscps2port *ps2port = dev_get_drvdata(&dev->dev); |
420 | 420 | ||
@@ -444,7 +444,7 @@ static struct parisc_driver parisc_ps2_driver = { | |||
444 | .name = "gsc_ps2", | 444 | .name = "gsc_ps2", |
445 | .id_table = gscps2_device_tbl, | 445 | .id_table = gscps2_device_tbl, |
446 | .probe = gscps2_probe, | 446 | .probe = gscps2_probe, |
447 | .remove = __devexit_p(gscps2_remove), | 447 | .remove = gscps2_remove, |
448 | }; | 448 | }; |
449 | 449 | ||
450 | static int __init gscps2_init(void) | 450 | static int __init gscps2_init(void) |
diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c index bfd3865d886..65605e4ef3c 100644 --- a/drivers/input/serio/hil_mlc.c +++ b/drivers/input/serio/hil_mlc.c | |||
@@ -686,13 +686,12 @@ static int hilse_donode(hil_mlc *mlc) | |||
686 | write_lock_irqsave(&mlc->lock, flags); | 686 | write_lock_irqsave(&mlc->lock, flags); |
687 | pack = node->object.packet; | 687 | pack = node->object.packet; |
688 | out: | 688 | out: |
689 | if (mlc->istarted) | 689 | if (!mlc->istarted) { |
690 | goto out2; | 690 | /* Prepare to receive input */ |
691 | /* Prepare to receive input */ | 691 | if ((node + 1)->act & HILSE_IN) |
692 | if ((node + 1)->act & HILSE_IN) | 692 | hilse_setup_input(mlc, node + 1); |
693 | hilse_setup_input(mlc, node + 1); | 693 | } |
694 | 694 | ||
695 | out2: | ||
696 | write_unlock_irqrestore(&mlc->lock, flags); | 695 | write_unlock_irqrestore(&mlc->lock, flags); |
697 | 696 | ||
698 | if (down_trylock(&mlc->osem)) { | 697 | if (down_trylock(&mlc->osem)) { |
@@ -1010,8 +1009,6 @@ static int __init hil_mlc_init(void) | |||
1010 | static void __exit hil_mlc_exit(void) | 1009 | static void __exit hil_mlc_exit(void) |
1011 | { | 1010 | { |
1012 | del_timer_sync(&hil_mlcs_kicker); | 1011 | del_timer_sync(&hil_mlcs_kicker); |
1013 | |||
1014 | tasklet_disable(&hil_mlcs_tasklet); | ||
1015 | tasklet_kill(&hil_mlcs_tasklet); | 1012 | tasklet_kill(&hil_mlcs_tasklet); |
1016 | } | 1013 | } |
1017 | 1014 | ||
diff --git a/drivers/input/serio/i8042-io.h b/drivers/input/serio/i8042-io.h index 5d48bb66aa7..a5eed2ade53 100644 --- a/drivers/input/serio/i8042-io.h +++ b/drivers/input/serio/i8042-io.h | |||
@@ -76,7 +76,7 @@ static inline int i8042_platform_init(void) | |||
76 | if (check_legacy_ioport(I8042_DATA_REG)) | 76 | if (check_legacy_ioport(I8042_DATA_REG)) |
77 | return -ENODEV; | 77 | return -ENODEV; |
78 | #endif | 78 | #endif |
79 | #if !defined(__sh__) && !defined(__alpha__) && !defined(__mips__) | 79 | #if !defined(__sh__) && !defined(__alpha__) |
80 | if (!request_region(I8042_DATA_REG, 16, "i8042")) | 80 | if (!request_region(I8042_DATA_REG, 16, "i8042")) |
81 | return -EBUSY; | 81 | return -EBUSY; |
82 | #endif | 82 | #endif |
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index 395a9af3adc..d6aa4c67dbb 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h | |||
@@ -49,7 +49,7 @@ static inline void i8042_write_command(int val) | |||
49 | #define OBP_PS2MS_NAME1 "kdmouse" | 49 | #define OBP_PS2MS_NAME1 "kdmouse" |
50 | #define OBP_PS2MS_NAME2 "mouse" | 50 | #define OBP_PS2MS_NAME2 "mouse" |
51 | 51 | ||
52 | static int __devinit sparc_i8042_probe(struct platform_device *op) | 52 | static int sparc_i8042_probe(struct platform_device *op) |
53 | { | 53 | { |
54 | struct device_node *dp = op->dev.of_node; | 54 | struct device_node *dp = op->dev.of_node; |
55 | 55 | ||
@@ -80,7 +80,7 @@ static int __devinit sparc_i8042_probe(struct platform_device *op) | |||
80 | return 0; | 80 | return 0; |
81 | } | 81 | } |
82 | 82 | ||
83 | static int __devexit sparc_i8042_remove(struct platform_device *op) | 83 | static int sparc_i8042_remove(struct platform_device *op) |
84 | { | 84 | { |
85 | of_iounmap(kbd_res, kbd_iobase, 8); | 85 | of_iounmap(kbd_res, kbd_iobase, 8); |
86 | 86 | ||
@@ -102,7 +102,7 @@ static struct platform_driver sparc_i8042_driver = { | |||
102 | .of_match_table = sparc_i8042_match, | 102 | .of_match_table = sparc_i8042_match, |
103 | }, | 103 | }, |
104 | .probe = sparc_i8042_probe, | 104 | .probe = sparc_i8042_probe, |
105 | .remove = __devexit_p(sparc_i8042_remove), | 105 | .remove = sparc_i8042_remove, |
106 | }; | 106 | }; |
107 | 107 | ||
108 | static int __init i8042_platform_init(void) | 108 | static int __init i8042_platform_init(void) |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 86564414b75..78e4de42efa 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -1284,7 +1284,7 @@ static void __init i8042_register_ports(void) | |||
1284 | } | 1284 | } |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | static void __devexit i8042_unregister_ports(void) | 1287 | static void i8042_unregister_ports(void) |
1288 | { | 1288 | { |
1289 | int i; | 1289 | int i; |
1290 | 1290 | ||
@@ -1437,7 +1437,7 @@ static int __init i8042_probe(struct platform_device *dev) | |||
1437 | return error; | 1437 | return error; |
1438 | } | 1438 | } |
1439 | 1439 | ||
1440 | static int __devexit i8042_remove(struct platform_device *dev) | 1440 | static int i8042_remove(struct platform_device *dev) |
1441 | { | 1441 | { |
1442 | i8042_unregister_ports(); | 1442 | i8042_unregister_ports(); |
1443 | i8042_free_irqs(); | 1443 | i8042_free_irqs(); |
@@ -1455,7 +1455,7 @@ static struct platform_driver i8042_driver = { | |||
1455 | .pm = &i8042_pm_ops, | 1455 | .pm = &i8042_pm_ops, |
1456 | #endif | 1456 | #endif |
1457 | }, | 1457 | }, |
1458 | .remove = __devexit_p(i8042_remove), | 1458 | .remove = i8042_remove, |
1459 | .shutdown = i8042_shutdown, | 1459 | .shutdown = i8042_shutdown, |
1460 | }; | 1460 | }; |
1461 | 1461 | ||
diff --git a/drivers/input/serio/maceps2.c b/drivers/input/serio/maceps2.c index 61da763b120..bc85e1cc66d 100644 --- a/drivers/input/serio/maceps2.c +++ b/drivers/input/serio/maceps2.c | |||
@@ -116,7 +116,7 @@ static void maceps2_close(struct serio *dev) | |||
116 | } | 116 | } |
117 | 117 | ||
118 | 118 | ||
119 | static struct serio * __devinit maceps2_allocate_port(int idx) | 119 | static struct serio *maceps2_allocate_port(int idx) |
120 | { | 120 | { |
121 | struct serio *serio; | 121 | struct serio *serio; |
122 | 122 | ||
@@ -135,7 +135,7 @@ static struct serio * __devinit maceps2_allocate_port(int idx) | |||
135 | return serio; | 135 | return serio; |
136 | } | 136 | } |
137 | 137 | ||
138 | static int __devinit maceps2_probe(struct platform_device *dev) | 138 | static int maceps2_probe(struct platform_device *dev) |
139 | { | 139 | { |
140 | maceps2_port[0] = maceps2_allocate_port(0); | 140 | maceps2_port[0] = maceps2_allocate_port(0); |
141 | maceps2_port[1] = maceps2_allocate_port(1); | 141 | maceps2_port[1] = maceps2_allocate_port(1); |
@@ -151,7 +151,7 @@ static int __devinit maceps2_probe(struct platform_device *dev) | |||
151 | return 0; | 151 | return 0; |
152 | } | 152 | } |
153 | 153 | ||
154 | static int __devexit maceps2_remove(struct platform_device *dev) | 154 | static int maceps2_remove(struct platform_device *dev) |
155 | { | 155 | { |
156 | serio_unregister_port(maceps2_port[0]); | 156 | serio_unregister_port(maceps2_port[0]); |
157 | serio_unregister_port(maceps2_port[1]); | 157 | serio_unregister_port(maceps2_port[1]); |
@@ -165,7 +165,7 @@ static struct platform_driver maceps2_driver = { | |||
165 | .owner = THIS_MODULE, | 165 | .owner = THIS_MODULE, |
166 | }, | 166 | }, |
167 | .probe = maceps2_probe, | 167 | .probe = maceps2_probe, |
168 | .remove = __devexit_p(maceps2_remove), | 168 | .remove = maceps2_remove, |
169 | }; | 169 | }; |
170 | 170 | ||
171 | static int __init maceps2_init(void) | 171 | static int __init maceps2_init(void) |
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c index 0c42497aaaf..76f83836fd5 100644 --- a/drivers/input/serio/pcips2.c +++ b/drivers/input/serio/pcips2.c | |||
@@ -127,7 +127,7 @@ static void pcips2_close(struct serio *io) | |||
127 | free_irq(ps2if->dev->irq, ps2if); | 127 | free_irq(ps2if->dev->irq, ps2if); |
128 | } | 128 | } |
129 | 129 | ||
130 | static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_id *id) | 130 | static int pcips2_probe(struct pci_dev *dev, const struct pci_device_id *id) |
131 | { | 131 | { |
132 | struct pcips2_data *ps2if; | 132 | struct pcips2_data *ps2if; |
133 | struct serio *serio; | 133 | struct serio *serio; |
@@ -176,7 +176,7 @@ static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_i | |||
176 | return ret; | 176 | return ret; |
177 | } | 177 | } |
178 | 178 | ||
179 | static void __devexit pcips2_remove(struct pci_dev *dev) | 179 | static void pcips2_remove(struct pci_dev *dev) |
180 | { | 180 | { |
181 | struct pcips2_data *ps2if = pci_get_drvdata(dev); | 181 | struct pcips2_data *ps2if = pci_get_drvdata(dev); |
182 | 182 | ||
@@ -212,7 +212,7 @@ static struct pci_driver pcips2_driver = { | |||
212 | .name = "pcips2", | 212 | .name = "pcips2", |
213 | .id_table = pcips2_ids, | 213 | .id_table = pcips2_ids, |
214 | .probe = pcips2_probe, | 214 | .probe = pcips2_probe, |
215 | .remove = __devexit_p(pcips2_remove), | 215 | .remove = pcips2_remove, |
216 | }; | 216 | }; |
217 | 217 | ||
218 | module_pci_driver(pcips2_driver); | 218 | module_pci_driver(pcips2_driver); |
diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c index 0c0df7f7380..70fe542839f 100644 --- a/drivers/input/serio/q40kbd.c +++ b/drivers/input/serio/q40kbd.c | |||
@@ -122,7 +122,7 @@ static void q40kbd_close(struct serio *port) | |||
122 | q40kbd_flush(q40kbd); | 122 | q40kbd_flush(q40kbd); |
123 | } | 123 | } |
124 | 124 | ||
125 | static int __devinit q40kbd_probe(struct platform_device *pdev) | 125 | static int q40kbd_probe(struct platform_device *pdev) |
126 | { | 126 | { |
127 | struct q40kbd *q40kbd; | 127 | struct q40kbd *q40kbd; |
128 | struct serio *port; | 128 | struct serio *port; |
@@ -168,7 +168,7 @@ err_free_mem: | |||
168 | return error; | 168 | return error; |
169 | } | 169 | } |
170 | 170 | ||
171 | static int __devexit q40kbd_remove(struct platform_device *pdev) | 171 | static int q40kbd_remove(struct platform_device *pdev) |
172 | { | 172 | { |
173 | struct q40kbd *q40kbd = platform_get_drvdata(pdev); | 173 | struct q40kbd *q40kbd = platform_get_drvdata(pdev); |
174 | 174 | ||
@@ -190,7 +190,7 @@ static struct platform_driver q40kbd_driver = { | |||
190 | .name = "q40kbd", | 190 | .name = "q40kbd", |
191 | .owner = THIS_MODULE, | 191 | .owner = THIS_MODULE, |
192 | }, | 192 | }, |
193 | .remove = __devexit_p(q40kbd_remove), | 193 | .remove = q40kbd_remove, |
194 | }; | 194 | }; |
195 | 195 | ||
196 | static int __init q40kbd_init(void) | 196 | static int __init q40kbd_init(void) |
diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c index 2af5df6a8fb..567566ae0da 100644 --- a/drivers/input/serio/rpckbd.c +++ b/drivers/input/serio/rpckbd.c | |||
@@ -114,7 +114,7 @@ static void rpckbd_close(struct serio *port) | |||
114 | * Allocate and initialize serio structure for subsequent registration | 114 | * Allocate and initialize serio structure for subsequent registration |
115 | * with serio core. | 115 | * with serio core. |
116 | */ | 116 | */ |
117 | static int __devinit rpckbd_probe(struct platform_device *dev) | 117 | static int rpckbd_probe(struct platform_device *dev) |
118 | { | 118 | { |
119 | struct rpckbd_data *rpckbd; | 119 | struct rpckbd_data *rpckbd; |
120 | struct serio *serio; | 120 | struct serio *serio; |
@@ -153,7 +153,7 @@ static int __devinit rpckbd_probe(struct platform_device *dev) | |||
153 | return 0; | 153 | return 0; |
154 | } | 154 | } |
155 | 155 | ||
156 | static int __devexit rpckbd_remove(struct platform_device *dev) | 156 | static int rpckbd_remove(struct platform_device *dev) |
157 | { | 157 | { |
158 | struct serio *serio = platform_get_drvdata(dev); | 158 | struct serio *serio = platform_get_drvdata(dev); |
159 | struct rpckbd_data *rpckbd = serio->port_data; | 159 | struct rpckbd_data *rpckbd = serio->port_data; |
@@ -166,7 +166,7 @@ static int __devexit rpckbd_remove(struct platform_device *dev) | |||
166 | 166 | ||
167 | static struct platform_driver rpckbd_driver = { | 167 | static struct platform_driver rpckbd_driver = { |
168 | .probe = rpckbd_probe, | 168 | .probe = rpckbd_probe, |
169 | .remove = __devexit_p(rpckbd_remove), | 169 | .remove = rpckbd_remove, |
170 | .driver = { | 170 | .driver = { |
171 | .name = "kart", | 171 | .name = "kart", |
172 | .owner = THIS_MODULE, | 172 | .owner = THIS_MODULE, |
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c index 38976670753..b3e688911fd 100644 --- a/drivers/input/serio/sa1111ps2.c +++ b/drivers/input/serio/sa1111ps2.c | |||
@@ -193,7 +193,7 @@ static void ps2_close(struct serio *io) | |||
193 | /* | 193 | /* |
194 | * Clear the input buffer. | 194 | * Clear the input buffer. |
195 | */ | 195 | */ |
196 | static void __devinit ps2_clear_input(struct ps2if *ps2if) | 196 | static void ps2_clear_input(struct ps2if *ps2if) |
197 | { | 197 | { |
198 | int maxread = 100; | 198 | int maxread = 100; |
199 | 199 | ||
@@ -203,7 +203,7 @@ static void __devinit ps2_clear_input(struct ps2if *ps2if) | |||
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
206 | static unsigned int __devinit ps2_test_one(struct ps2if *ps2if, | 206 | static unsigned int ps2_test_one(struct ps2if *ps2if, |
207 | unsigned int mask) | 207 | unsigned int mask) |
208 | { | 208 | { |
209 | unsigned int val; | 209 | unsigned int val; |
@@ -220,7 +220,7 @@ static unsigned int __devinit ps2_test_one(struct ps2if *ps2if, | |||
220 | * Test the keyboard interface. We basically check to make sure that | 220 | * Test the keyboard interface. We basically check to make sure that |
221 | * we can drive each line to the keyboard independently of each other. | 221 | * we can drive each line to the keyboard independently of each other. |
222 | */ | 222 | */ |
223 | static int __devinit ps2_test(struct ps2if *ps2if) | 223 | static int ps2_test(struct ps2if *ps2if) |
224 | { | 224 | { |
225 | unsigned int stat; | 225 | unsigned int stat; |
226 | int ret = 0; | 226 | int ret = 0; |
@@ -251,7 +251,7 @@ static int __devinit ps2_test(struct ps2if *ps2if) | |||
251 | /* | 251 | /* |
252 | * Add one device to this driver. | 252 | * Add one device to this driver. |
253 | */ | 253 | */ |
254 | static int __devinit ps2_probe(struct sa1111_dev *dev) | 254 | static int ps2_probe(struct sa1111_dev *dev) |
255 | { | 255 | { |
256 | struct ps2if *ps2if; | 256 | struct ps2if *ps2if; |
257 | struct serio *serio; | 257 | struct serio *serio; |
@@ -334,7 +334,7 @@ static int __devinit ps2_probe(struct sa1111_dev *dev) | |||
334 | /* | 334 | /* |
335 | * Remove one device from this driver. | 335 | * Remove one device from this driver. |
336 | */ | 336 | */ |
337 | static int __devexit ps2_remove(struct sa1111_dev *dev) | 337 | static int ps2_remove(struct sa1111_dev *dev) |
338 | { | 338 | { |
339 | struct ps2if *ps2if = sa1111_get_drvdata(dev); | 339 | struct ps2if *ps2if = sa1111_get_drvdata(dev); |
340 | 340 | ||
@@ -357,7 +357,7 @@ static struct sa1111_driver ps2_driver = { | |||
357 | }, | 357 | }, |
358 | .devid = SA1111_DEVID_PS2, | 358 | .devid = SA1111_DEVID_PS2, |
359 | .probe = ps2_probe, | 359 | .probe = ps2_probe, |
360 | .remove = __devexit_p(ps2_remove), | 360 | .remove = ps2_remove, |
361 | }; | 361 | }; |
362 | 362 | ||
363 | static int __init ps2_init(void) | 363 | static int __init ps2_init(void) |
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index d0f7533dbf8..25fc5971f42 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c | |||
@@ -891,8 +891,6 @@ static int serio_bus_match(struct device *dev, struct device_driver *drv) | |||
891 | return serio_match_port(serio_drv->id_table, serio); | 891 | return serio_match_port(serio_drv->id_table, serio); |
892 | } | 892 | } |
893 | 893 | ||
894 | #ifdef CONFIG_HOTPLUG | ||
895 | |||
896 | #define SERIO_ADD_UEVENT_VAR(fmt, val...) \ | 894 | #define SERIO_ADD_UEVENT_VAR(fmt, val...) \ |
897 | do { \ | 895 | do { \ |
898 | int err = add_uevent_var(env, fmt, val); \ | 896 | int err = add_uevent_var(env, fmt, val); \ |
@@ -920,15 +918,6 @@ static int serio_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
920 | } | 918 | } |
921 | #undef SERIO_ADD_UEVENT_VAR | 919 | #undef SERIO_ADD_UEVENT_VAR |
922 | 920 | ||
923 | #else | ||
924 | |||
925 | static int serio_uevent(struct device *dev, struct kobj_uevent_env *env) | ||
926 | { | ||
927 | return -ENODEV; | ||
928 | } | ||
929 | |||
930 | #endif /* CONFIG_HOTPLUG */ | ||
931 | |||
932 | #ifdef CONFIG_PM | 921 | #ifdef CONFIG_PM |
933 | static int serio_suspend(struct device *dev) | 922 | static int serio_suspend(struct device *dev) |
934 | { | 923 | { |
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index 1e983bec7d8..17be85948ff 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
@@ -233,7 +233,7 @@ static void sxps2_close(struct serio *pserio) | |||
233 | * It returns 0, if the driver is bound to the PS/2 device, or a negative | 233 | * It returns 0, if the driver is bound to the PS/2 device, or a negative |
234 | * value if there is an error. | 234 | * value if there is an error. |
235 | */ | 235 | */ |
236 | static int __devinit xps2_of_probe(struct platform_device *ofdev) | 236 | static int xps2_of_probe(struct platform_device *ofdev) |
237 | { | 237 | { |
238 | struct resource r_irq; /* Interrupt resources */ | 238 | struct resource r_irq; /* Interrupt resources */ |
239 | struct resource r_mem; /* IO mem resources */ | 239 | struct resource r_mem; /* IO mem resources */ |
@@ -333,7 +333,7 @@ failed1: | |||
333 | * if the driver module is being unloaded. It frees any resources allocated to | 333 | * if the driver module is being unloaded. It frees any resources allocated to |
334 | * the device. | 334 | * the device. |
335 | */ | 335 | */ |
336 | static int __devexit xps2_of_remove(struct platform_device *of_dev) | 336 | static int xps2_of_remove(struct platform_device *of_dev) |
337 | { | 337 | { |
338 | struct xps2data *drvdata = platform_get_drvdata(of_dev); | 338 | struct xps2data *drvdata = platform_get_drvdata(of_dev); |
339 | struct resource r_mem; /* IO mem resources */ | 339 | struct resource r_mem; /* IO mem resources */ |
@@ -355,7 +355,7 @@ static int __devexit xps2_of_remove(struct platform_device *of_dev) | |||
355 | } | 355 | } |
356 | 356 | ||
357 | /* Match table for of_platform binding */ | 357 | /* Match table for of_platform binding */ |
358 | static const struct of_device_id xps2_of_match[] __devinitconst = { | 358 | static const struct of_device_id xps2_of_match[] = { |
359 | { .compatible = "xlnx,xps-ps2-1.00.a", }, | 359 | { .compatible = "xlnx,xps-ps2-1.00.a", }, |
360 | { /* end of list */ }, | 360 | { /* end of list */ }, |
361 | }; | 361 | }; |
@@ -368,7 +368,7 @@ static struct platform_driver xps2_of_driver = { | |||
368 | .of_match_table = xps2_of_match, | 368 | .of_match_table = xps2_of_match, |
369 | }, | 369 | }, |
370 | .probe = xps2_of_probe, | 370 | .probe = xps2_of_probe, |
371 | .remove = __devexit_p(xps2_of_remove), | 371 | .remove = xps2_of_remove, |
372 | }; | 372 | }; |
373 | module_platform_driver(xps2_of_driver); | 373 | module_platform_driver(xps2_of_driver); |
374 | 374 | ||