diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/gameport/fm801-gp.c | 22 | ||||
-rw-r--r-- | drivers/input/gameport/gameport.c | 18 | ||||
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 54 | ||||
-rw-r--r-- | drivers/input/keyboard/corgikbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/lkkbd.c | 5 | ||||
-rw-r--r-- | drivers/input/keyboard/locomokbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/spitzkbd.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/hp_sdc_rtc.c | 8 | ||||
-rw-r--r-- | drivers/input/misc/wistron_btns.c | 2 | ||||
-rw-r--r-- | drivers/input/serio/hil_mlc.c | 18 | ||||
-rw-r--r-- | drivers/input/serio/hp_sdc.c | 4 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 13 | ||||
-rw-r--r-- | drivers/input/serio/libps2.c | 3 | ||||
-rw-r--r-- | drivers/input/serio/serio.c | 22 | ||||
-rw-r--r-- | drivers/input/touchscreen/corgi_ts.c | 4 | ||||
-rw-r--r-- | drivers/input/touchscreen/hp680_ts_input.c | 2 |
16 files changed, 126 insertions, 55 deletions
diff --git a/drivers/input/gameport/fm801-gp.c b/drivers/input/gameport/fm801-gp.c index 90de5afe03c2..1dec00e20dbc 100644 --- a/drivers/input/gameport/fm801-gp.c +++ b/drivers/input/gameport/fm801-gp.c | |||
@@ -82,17 +82,19 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device | |||
82 | { | 82 | { |
83 | struct fm801_gp *gp; | 83 | struct fm801_gp *gp; |
84 | struct gameport *port; | 84 | struct gameport *port; |
85 | int error; | ||
85 | 86 | ||
86 | gp = kzalloc(sizeof(struct fm801_gp), GFP_KERNEL); | 87 | gp = kzalloc(sizeof(struct fm801_gp), GFP_KERNEL); |
87 | port = gameport_allocate_port(); | 88 | port = gameport_allocate_port(); |
88 | if (!gp || !port) { | 89 | if (!gp || !port) { |
89 | printk(KERN_ERR "fm801-gp: Memory allocation failed\n"); | 90 | printk(KERN_ERR "fm801-gp: Memory allocation failed\n"); |
90 | kfree(gp); | 91 | error = -ENOMEM; |
91 | gameport_free_port(port); | 92 | goto err_out_free; |
92 | return -ENOMEM; | ||
93 | } | 93 | } |
94 | 94 | ||
95 | pci_enable_device(pci); | 95 | error = pci_enable_device(pci); |
96 | if (error) | ||
97 | goto err_out_free; | ||
96 | 98 | ||
97 | port->open = fm801_gp_open; | 99 | port->open = fm801_gp_open; |
98 | #ifdef HAVE_COOKED | 100 | #ifdef HAVE_COOKED |
@@ -108,9 +110,8 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device | |||
108 | if (!gp->res_port) { | 110 | if (!gp->res_port) { |
109 | printk(KERN_DEBUG "fm801-gp: unable to grab region 0x%x-0x%x\n", | 111 | printk(KERN_DEBUG "fm801-gp: unable to grab region 0x%x-0x%x\n", |
110 | port->io, port->io + 0x0f); | 112 | port->io, port->io + 0x0f); |
111 | gameport_free_port(port); | 113 | error = -EBUSY; |
112 | kfree(gp); | 114 | goto err_out_disable_dev; |
113 | return -EBUSY; | ||
114 | } | 115 | } |
115 | 116 | ||
116 | pci_set_drvdata(pci, gp); | 117 | pci_set_drvdata(pci, gp); |
@@ -119,6 +120,13 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device | |||
119 | gameport_register_port(port); | 120 | gameport_register_port(port); |
120 | 121 | ||
121 | return 0; | 122 | return 0; |
123 | |||
124 | err_out_disable_dev: | ||
125 | pci_disable_device(pci); | ||
126 | err_out_free: | ||
127 | gameport_free_port(port); | ||
128 | kfree(gp); | ||
129 | return error; | ||
122 | } | 130 | } |
123 | 131 | ||
124 | static void __devexit fm801_gp_remove(struct pci_dev *pci) | 132 | static void __devexit fm801_gp_remove(struct pci_dev *pci) |
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index 3f47ae55c6f3..a0af97efe6ac 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c | |||
@@ -191,6 +191,8 @@ static void gameport_run_poll_handler(unsigned long d) | |||
191 | 191 | ||
192 | static void gameport_bind_driver(struct gameport *gameport, struct gameport_driver *drv) | 192 | static void gameport_bind_driver(struct gameport *gameport, struct gameport_driver *drv) |
193 | { | 193 | { |
194 | int error; | ||
195 | |||
194 | down_write(&gameport_bus.subsys.rwsem); | 196 | down_write(&gameport_bus.subsys.rwsem); |
195 | 197 | ||
196 | gameport->dev.driver = &drv->driver; | 198 | gameport->dev.driver = &drv->driver; |
@@ -198,8 +200,20 @@ static void gameport_bind_driver(struct gameport *gameport, struct gameport_driv | |||
198 | gameport->dev.driver = NULL; | 200 | gameport->dev.driver = NULL; |
199 | goto out; | 201 | goto out; |
200 | } | 202 | } |
201 | device_bind_driver(&gameport->dev); | 203 | |
202 | out: | 204 | error = device_bind_driver(&gameport->dev); |
205 | if (error) { | ||
206 | printk(KERN_WARNING | ||
207 | "gameport: device_bind_driver() failed " | ||
208 | "for %s (%s) and %s, error: %d\n", | ||
209 | gameport->phys, gameport->name, | ||
210 | drv->description, error); | ||
211 | drv->disconnect(gameport); | ||
212 | gameport->dev.driver = NULL; | ||
213 | goto out; | ||
214 | } | ||
215 | |||
216 | out: | ||
203 | up_write(&gameport_bus.subsys.rwsem); | 217 | up_write(&gameport_bus.subsys.rwsem); |
204 | } | 218 | } |
205 | 219 | ||
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index b6ef9eaad1dc..cbb93669d1ce 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -221,6 +221,7 @@ struct atkbd { | |||
221 | unsigned long xl_bit; | 221 | unsigned long xl_bit; |
222 | unsigned int last; | 222 | unsigned int last; |
223 | unsigned long time; | 223 | unsigned long time; |
224 | unsigned long err_count; | ||
224 | 225 | ||
225 | struct work_struct event_work; | 226 | struct work_struct event_work; |
226 | struct mutex event_mutex; | 227 | struct mutex event_mutex; |
@@ -234,11 +235,13 @@ static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t | |||
234 | #define ATKBD_DEFINE_ATTR(_name) \ | 235 | #define ATKBD_DEFINE_ATTR(_name) \ |
235 | static ssize_t atkbd_show_##_name(struct atkbd *, char *); \ | 236 | static ssize_t atkbd_show_##_name(struct atkbd *, char *); \ |
236 | static ssize_t atkbd_set_##_name(struct atkbd *, const char *, size_t); \ | 237 | static ssize_t atkbd_set_##_name(struct atkbd *, const char *, size_t); \ |
237 | static ssize_t atkbd_do_show_##_name(struct device *d, struct device_attribute *attr, char *b) \ | 238 | static ssize_t atkbd_do_show_##_name(struct device *d, \ |
239 | struct device_attribute *attr, char *b) \ | ||
238 | { \ | 240 | { \ |
239 | return atkbd_attr_show_helper(d, b, atkbd_show_##_name); \ | 241 | return atkbd_attr_show_helper(d, b, atkbd_show_##_name); \ |
240 | } \ | 242 | } \ |
241 | static ssize_t atkbd_do_set_##_name(struct device *d, struct device_attribute *attr, const char *b, size_t s) \ | 243 | static ssize_t atkbd_do_set_##_name(struct device *d, \ |
244 | struct device_attribute *attr, const char *b, size_t s) \ | ||
242 | { \ | 245 | { \ |
243 | return atkbd_attr_set_helper(d, b, s, atkbd_set_##_name); \ | 246 | return atkbd_attr_set_helper(d, b, s, atkbd_set_##_name); \ |
244 | } \ | 247 | } \ |
@@ -251,6 +254,32 @@ ATKBD_DEFINE_ATTR(set); | |||
251 | ATKBD_DEFINE_ATTR(softrepeat); | 254 | ATKBD_DEFINE_ATTR(softrepeat); |
252 | ATKBD_DEFINE_ATTR(softraw); | 255 | ATKBD_DEFINE_ATTR(softraw); |
253 | 256 | ||
257 | #define ATKBD_DEFINE_RO_ATTR(_name) \ | ||
258 | static ssize_t atkbd_show_##_name(struct atkbd *, char *); \ | ||
259 | static ssize_t atkbd_do_show_##_name(struct device *d, \ | ||
260 | struct device_attribute *attr, char *b) \ | ||
261 | { \ | ||
262 | return atkbd_attr_show_helper(d, b, atkbd_show_##_name); \ | ||
263 | } \ | ||
264 | static struct device_attribute atkbd_attr_##_name = \ | ||
265 | __ATTR(_name, S_IRUGO, atkbd_do_show_##_name, NULL); | ||
266 | |||
267 | ATKBD_DEFINE_RO_ATTR(err_count); | ||
268 | |||
269 | static struct attribute *atkbd_attributes[] = { | ||
270 | &atkbd_attr_extra.attr, | ||
271 | &atkbd_attr_scroll.attr, | ||
272 | &atkbd_attr_set.attr, | ||
273 | &atkbd_attr_softrepeat.attr, | ||
274 | &atkbd_attr_softraw.attr, | ||
275 | &atkbd_attr_err_count.attr, | ||
276 | NULL | ||
277 | }; | ||
278 | |||
279 | static struct attribute_group atkbd_attribute_group = { | ||
280 | .attrs = atkbd_attributes, | ||
281 | }; | ||
282 | |||
254 | static const unsigned int xl_table[] = { | 283 | static const unsigned int xl_table[] = { |
255 | ATKBD_RET_BAT, ATKBD_RET_ERR, ATKBD_RET_ACK, | 284 | ATKBD_RET_BAT, ATKBD_RET_ERR, ATKBD_RET_ACK, |
256 | ATKBD_RET_NAK, ATKBD_RET_HANJA, ATKBD_RET_HANGEUL, | 285 | ATKBD_RET_NAK, ATKBD_RET_HANJA, ATKBD_RET_HANGEUL, |
@@ -396,7 +425,10 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, | |||
396 | add_release_event = 1; | 425 | add_release_event = 1; |
397 | break; | 426 | break; |
398 | case ATKBD_RET_ERR: | 427 | case ATKBD_RET_ERR: |
428 | atkbd->err_count++; | ||
429 | #ifdef ATKBD_DEBUG | ||
399 | printk(KERN_DEBUG "atkbd.c: Keyboard on %s reports too many keys pressed.\n", serio->phys); | 430 | printk(KERN_DEBUG "atkbd.c: Keyboard on %s reports too many keys pressed.\n", serio->phys); |
431 | #endif | ||
400 | goto out; | 432 | goto out; |
401 | } | 433 | } |
402 | 434 | ||
@@ -786,12 +818,7 @@ static void atkbd_disconnect(struct serio *serio) | |||
786 | synchronize_sched(); /* Allow atkbd_interrupt()s to complete. */ | 818 | synchronize_sched(); /* Allow atkbd_interrupt()s to complete. */ |
787 | flush_scheduled_work(); | 819 | flush_scheduled_work(); |
788 | 820 | ||
789 | device_remove_file(&serio->dev, &atkbd_attr_extra); | 821 | sysfs_remove_group(&serio->dev.kobj, &atkbd_attribute_group); |
790 | device_remove_file(&serio->dev, &atkbd_attr_scroll); | ||
791 | device_remove_file(&serio->dev, &atkbd_attr_set); | ||
792 | device_remove_file(&serio->dev, &atkbd_attr_softrepeat); | ||
793 | device_remove_file(&serio->dev, &atkbd_attr_softraw); | ||
794 | |||
795 | input_unregister_device(atkbd->dev); | 822 | input_unregister_device(atkbd->dev); |
796 | serio_close(serio); | 823 | serio_close(serio); |
797 | serio_set_drvdata(serio, NULL); | 824 | serio_set_drvdata(serio, NULL); |
@@ -961,11 +988,7 @@ static int atkbd_connect(struct serio *serio, struct serio_driver *drv) | |||
961 | atkbd_set_keycode_table(atkbd); | 988 | atkbd_set_keycode_table(atkbd); |
962 | atkbd_set_device_attrs(atkbd); | 989 | atkbd_set_device_attrs(atkbd); |
963 | 990 | ||
964 | device_create_file(&serio->dev, &atkbd_attr_extra); | 991 | sysfs_create_group(&serio->dev.kobj, &atkbd_attribute_group); |
965 | device_create_file(&serio->dev, &atkbd_attr_scroll); | ||
966 | device_create_file(&serio->dev, &atkbd_attr_set); | ||
967 | device_create_file(&serio->dev, &atkbd_attr_softrepeat); | ||
968 | device_create_file(&serio->dev, &atkbd_attr_softraw); | ||
969 | 992 | ||
970 | atkbd_enable(atkbd); | 993 | atkbd_enable(atkbd); |
971 | 994 | ||
@@ -1259,6 +1282,11 @@ static ssize_t atkbd_set_softraw(struct atkbd *atkbd, const char *buf, size_t co | |||
1259 | return count; | 1282 | return count; |
1260 | } | 1283 | } |
1261 | 1284 | ||
1285 | static ssize_t atkbd_show_err_count(struct atkbd *atkbd, char *buf) | ||
1286 | { | ||
1287 | return sprintf(buf, "%lu\n", atkbd->err_count); | ||
1288 | } | ||
1289 | |||
1262 | 1290 | ||
1263 | static int __init atkbd_init(void) | 1291 | static int __init atkbd_init(void) |
1264 | { | 1292 | { |
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index cb70970625b5..befdd6006b50 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c | |||
@@ -207,7 +207,7 @@ static irqreturn_t corgikbd_interrupt(int irq, void *dev_id) | |||
207 | static void corgikbd_timer_callback(unsigned long data) | 207 | static void corgikbd_timer_callback(unsigned long data) |
208 | { | 208 | { |
209 | struct corgikbd *corgikbd_data = (struct corgikbd *) data; | 209 | struct corgikbd *corgikbd_data = (struct corgikbd *) data; |
210 | corgikbd_scankeyboard(corgikbd_data, NULL); | 210 | corgikbd_scankeyboard(corgikbd_data); |
211 | } | 211 | } |
212 | 212 | ||
213 | /* | 213 | /* |
diff --git a/drivers/input/keyboard/lkkbd.c b/drivers/input/keyboard/lkkbd.c index 708d5a1bc3d2..979b93e33da7 100644 --- a/drivers/input/keyboard/lkkbd.c +++ b/drivers/input/keyboard/lkkbd.c | |||
@@ -59,11 +59,6 @@ | |||
59 | * You should have received a copy of the GNU General Public License | 59 | * You should have received a copy of the GNU General Public License |
60 | * along with this program; if not, write to the Free Software | 60 | * along with this program; if not, write to the Free Software |
61 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 61 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
62 | * | ||
63 | * Should you need to contact me, the author, you can do so either by | ||
64 | * email or by paper mail: | ||
65 | * Jan-Benedict Glaw, Lilienstraße 16, 33790 Hörste (near Halle/Westf.), | ||
66 | * Germany. | ||
67 | */ | 62 | */ |
68 | 63 | ||
69 | #include <linux/delay.h> | 64 | #include <linux/delay.h> |
diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c index fd33c9cc3272..5788dbc317bb 100644 --- a/drivers/input/keyboard/locomokbd.c +++ b/drivers/input/keyboard/locomokbd.c | |||
@@ -186,7 +186,7 @@ static irqreturn_t locomokbd_interrupt(int irq, void *dev_id) | |||
186 | static void locomokbd_timer_callback(unsigned long data) | 186 | static void locomokbd_timer_callback(unsigned long data) |
187 | { | 187 | { |
188 | struct locomokbd *locomokbd = (struct locomokbd *) data; | 188 | struct locomokbd *locomokbd = (struct locomokbd *) data; |
189 | locomokbd_scankeyboard(locomokbd, NULL); | 189 | locomokbd_scankeyboard(locomokbd); |
190 | } | 190 | } |
191 | 191 | ||
192 | static int locomokbd_probe(struct locomo_dev *dev) | 192 | static int locomokbd_probe(struct locomo_dev *dev) |
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 8b18c009e3e0..28b2748e82d0 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -257,7 +257,7 @@ static void spitzkbd_timer_callback(unsigned long data) | |||
257 | { | 257 | { |
258 | struct spitzkbd *spitzkbd_data = (struct spitzkbd *) data; | 258 | struct spitzkbd *spitzkbd_data = (struct spitzkbd *) data; |
259 | 259 | ||
260 | spitzkbd_scankeyboard(spitzkbd_data, NULL); | 260 | spitzkbd_scankeyboard(spitzkbd_data); |
261 | } | 261 | } |
262 | 262 | ||
263 | /* | 263 | /* |
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index 1be963961c15..ab4da79ee560 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c | |||
@@ -60,7 +60,7 @@ static struct fasync_struct *hp_sdc_rtc_async_queue; | |||
60 | 60 | ||
61 | static DECLARE_WAIT_QUEUE_HEAD(hp_sdc_rtc_wait); | 61 | static DECLARE_WAIT_QUEUE_HEAD(hp_sdc_rtc_wait); |
62 | 62 | ||
63 | static ssize_t hp_sdc_rtc_read(struct file *file, char *buf, | 63 | static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf, |
64 | size_t count, loff_t *ppos); | 64 | size_t count, loff_t *ppos); |
65 | 65 | ||
66 | static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file, | 66 | static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file, |
@@ -385,14 +385,14 @@ static int hp_sdc_rtc_set_i8042timer (struct timeval *setto, uint8_t setcmd) | |||
385 | return 0; | 385 | return 0; |
386 | } | 386 | } |
387 | 387 | ||
388 | static ssize_t hp_sdc_rtc_read(struct file *file, char *buf, | 388 | static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf, |
389 | size_t count, loff_t *ppos) { | 389 | size_t count, loff_t *ppos) { |
390 | ssize_t retval; | 390 | ssize_t retval; |
391 | 391 | ||
392 | if (count < sizeof(unsigned long)) | 392 | if (count < sizeof(unsigned long)) |
393 | return -EINVAL; | 393 | return -EINVAL; |
394 | 394 | ||
395 | retval = put_user(68, (unsigned long *)buf); | 395 | retval = put_user(68, (unsigned long __user *)buf); |
396 | return retval; | 396 | return retval; |
397 | } | 397 | } |
398 | 398 | ||
@@ -696,7 +696,7 @@ static int __init hp_sdc_rtc_init(void) | |||
696 | if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) | 696 | if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) |
697 | return ret; | 697 | return ret; |
698 | misc_register(&hp_sdc_rtc_dev); | 698 | misc_register(&hp_sdc_rtc_dev); |
699 | create_proc_read_entry ("driver/rtc", 0, 0, | 699 | create_proc_read_entry ("driver/rtc", 0, NULL, |
700 | hp_sdc_rtc_read_proc, NULL); | 700 | hp_sdc_rtc_read_proc, NULL); |
701 | 701 | ||
702 | printk(KERN_INFO "HP i8042 SDC + MSM-58321 RTC support loaded " | 702 | printk(KERN_INFO "HP i8042 SDC + MSM-58321 RTC support loaded " |
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 4639537336fc..7b9d1c1da41a 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | 17 | * with this program; if not, write to the Free Software Foundation, Inc., |
18 | * 59 Temple Place Suite 330, Boston, MA 02111-1307, USA. | 18 | * 59 Temple Place Suite 330, Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | #include <asm/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/dmi.h> | 21 | #include <linux/dmi.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/input.h> | 23 | #include <linux/input.h> |
diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c index bdfde046b741..49e11e2c1d5d 100644 --- a/drivers/input/serio/hil_mlc.c +++ b/drivers/input/serio/hil_mlc.c | |||
@@ -391,23 +391,23 @@ static int hilse_operate(hil_mlc *mlc, int repoll) { | |||
391 | } | 391 | } |
392 | 392 | ||
393 | #define FUNC(funct, funct_arg, zero_rc, neg_rc, pos_rc) \ | 393 | #define FUNC(funct, funct_arg, zero_rc, neg_rc, pos_rc) \ |
394 | { HILSE_FUNC, { func: &funct }, funct_arg, zero_rc, neg_rc, pos_rc }, | 394 | { HILSE_FUNC, { .func = funct }, funct_arg, zero_rc, neg_rc, pos_rc }, |
395 | #define OUT(pack) \ | 395 | #define OUT(pack) \ |
396 | { HILSE_OUT, { packet: pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 }, | 396 | { HILSE_OUT, { .packet = pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 }, |
397 | #define CTS \ | 397 | #define CTS \ |
398 | { HILSE_CTS, { packet: 0 }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 }, | 398 | { HILSE_CTS, { .packet = 0 }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 }, |
399 | #define EXPECT(comp, to, got, got_wrong, timed_out) \ | 399 | #define EXPECT(comp, to, got, got_wrong, timed_out) \ |
400 | { HILSE_EXPECT, { packet: comp }, to, got, got_wrong, timed_out }, | 400 | { HILSE_EXPECT, { .packet = comp }, to, got, got_wrong, timed_out }, |
401 | #define EXPECT_LAST(comp, to, got, got_wrong, timed_out) \ | 401 | #define EXPECT_LAST(comp, to, got, got_wrong, timed_out) \ |
402 | { HILSE_EXPECT_LAST, { packet: comp }, to, got, got_wrong, timed_out }, | 402 | { HILSE_EXPECT_LAST, { .packet = comp }, to, got, got_wrong, timed_out }, |
403 | #define EXPECT_DISC(comp, to, got, got_wrong, timed_out) \ | 403 | #define EXPECT_DISC(comp, to, got, got_wrong, timed_out) \ |
404 | { HILSE_EXPECT_DISC, { packet: comp }, to, got, got_wrong, timed_out }, | 404 | { HILSE_EXPECT_DISC, { .packet = comp }, to, got, got_wrong, timed_out }, |
405 | #define IN(to, got, got_error, timed_out) \ | 405 | #define IN(to, got, got_error, timed_out) \ |
406 | { HILSE_IN, { packet: 0 }, to, got, got_error, timed_out }, | 406 | { HILSE_IN, { .packet = 0 }, to, got, got_error, timed_out }, |
407 | #define OUT_DISC(pack) \ | 407 | #define OUT_DISC(pack) \ |
408 | { HILSE_OUT_DISC, { packet: pack }, 0, 0, 0, 0 }, | 408 | { HILSE_OUT_DISC, { .packet = pack }, 0, 0, 0, 0 }, |
409 | #define OUT_LAST(pack) \ | 409 | #define OUT_LAST(pack) \ |
410 | { HILSE_OUT_LAST, { packet: pack }, 0, 0, 0, 0 }, | 410 | { HILSE_OUT_LAST, { .packet = pack }, 0, 0, 0, 0 }, |
411 | 411 | ||
412 | struct hilse_node hil_mlc_se[HILSEN_END] = { | 412 | struct hilse_node hil_mlc_se[HILSEN_END] = { |
413 | 413 | ||
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c index ba7b920347e3..9907ad3bea23 100644 --- a/drivers/input/serio/hp_sdc.c +++ b/drivers/input/serio/hp_sdc.c | |||
@@ -310,7 +310,7 @@ static void hp_sdc_tasklet(unsigned long foo) { | |||
310 | * in tasklet/bh context. | 310 | * in tasklet/bh context. |
311 | */ | 311 | */ |
312 | if (curr->act.irqhook) | 312 | if (curr->act.irqhook) |
313 | curr->act.irqhook(0, 0, 0, 0); | 313 | curr->act.irqhook(0, NULL, 0, 0); |
314 | } | 314 | } |
315 | curr->actidx = curr->idx; | 315 | curr->actidx = curr->idx; |
316 | curr->idx++; | 316 | curr->idx++; |
@@ -525,7 +525,7 @@ actdone: | |||
525 | up(curr->act.semaphore); | 525 | up(curr->act.semaphore); |
526 | } | 526 | } |
527 | else if (act & HP_SDC_ACT_CALLBACK) { | 527 | else if (act & HP_SDC_ACT_CALLBACK) { |
528 | curr->act.irqhook(0,0,0,0); | 528 | curr->act.irqhook(0,NULL,0,0); |
529 | } | 529 | } |
530 | if (curr->idx >= curr->endidx) { /* This transaction is over. */ | 530 | if (curr->idx >= curr->endidx) { /* This transaction is over. */ |
531 | if (act & HP_SDC_ACT_DEALLOC) kfree(curr); | 531 | if (act & HP_SDC_ACT_DEALLOC) kfree(curr); |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 09b06e605b50..7e3141f37e32 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -106,6 +106,7 @@ static unsigned char i8042_ctr; | |||
106 | static unsigned char i8042_mux_present; | 106 | static unsigned char i8042_mux_present; |
107 | static unsigned char i8042_kbd_irq_registered; | 107 | static unsigned char i8042_kbd_irq_registered; |
108 | static unsigned char i8042_aux_irq_registered; | 108 | static unsigned char i8042_aux_irq_registered; |
109 | static unsigned char i8042_suppress_kbd_ack; | ||
109 | static struct platform_device *i8042_platform_device; | 110 | static struct platform_device *i8042_platform_device; |
110 | 111 | ||
111 | static irqreturn_t i8042_interrupt(int irq, void *dev_id); | 112 | static irqreturn_t i8042_interrupt(int irq, void *dev_id); |
@@ -316,7 +317,7 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id) | |||
316 | unsigned char str, data; | 317 | unsigned char str, data; |
317 | unsigned int dfl; | 318 | unsigned int dfl; |
318 | unsigned int port_no; | 319 | unsigned int port_no; |
319 | int ret; | 320 | int ret = 1; |
320 | 321 | ||
321 | spin_lock_irqsave(&i8042_lock, flags); | 322 | spin_lock_irqsave(&i8042_lock, flags); |
322 | str = i8042_read_status(); | 323 | str = i8042_read_status(); |
@@ -378,10 +379,16 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id) | |||
378 | dfl & SERIO_PARITY ? ", bad parity" : "", | 379 | dfl & SERIO_PARITY ? ", bad parity" : "", |
379 | dfl & SERIO_TIMEOUT ? ", timeout" : ""); | 380 | dfl & SERIO_TIMEOUT ? ", timeout" : ""); |
380 | 381 | ||
382 | if (unlikely(i8042_suppress_kbd_ack)) | ||
383 | if (port_no == I8042_KBD_PORT_NO && | ||
384 | (data == 0xfa || data == 0xfe)) { | ||
385 | i8042_suppress_kbd_ack = 0; | ||
386 | goto out; | ||
387 | } | ||
388 | |||
381 | if (likely(port->exists)) | 389 | if (likely(port->exists)) |
382 | serio_interrupt(port->serio, data, dfl); | 390 | serio_interrupt(port->serio, data, dfl); |
383 | 391 | ||
384 | ret = 1; | ||
385 | out: | 392 | out: |
386 | return IRQ_RETVAL(ret); | 393 | return IRQ_RETVAL(ret); |
387 | } | 394 | } |
@@ -842,11 +849,13 @@ static long i8042_panic_blink(long count) | |||
842 | led ^= 0x01 | 0x04; | 849 | led ^= 0x01 | 0x04; |
843 | while (i8042_read_status() & I8042_STR_IBF) | 850 | while (i8042_read_status() & I8042_STR_IBF) |
844 | DELAY; | 851 | DELAY; |
852 | i8042_suppress_kbd_ack = 1; | ||
845 | i8042_write_data(0xed); /* set leds */ | 853 | i8042_write_data(0xed); /* set leds */ |
846 | DELAY; | 854 | DELAY; |
847 | while (i8042_read_status() & I8042_STR_IBF) | 855 | while (i8042_read_status() & I8042_STR_IBF) |
848 | DELAY; | 856 | DELAY; |
849 | DELAY; | 857 | DELAY; |
858 | i8042_suppress_kbd_ack = 1; | ||
850 | i8042_write_data(led); | 859 | i8042_write_data(led); |
851 | DELAY; | 860 | DELAY; |
852 | last_blink = count; | 861 | last_blink = count; |
diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c index dcb16b5cbec0..e5b1b60757bb 100644 --- a/drivers/input/serio/libps2.c +++ b/drivers/input/serio/libps2.c | |||
@@ -189,7 +189,7 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) | |||
189 | return -1; | 189 | return -1; |
190 | } | 190 | } |
191 | 191 | ||
192 | mutex_lock_nested(&ps2dev->cmd_mutex, SINGLE_DEPTH_NESTING); | 192 | mutex_lock(&ps2dev->cmd_mutex); |
193 | 193 | ||
194 | serio_pause_rx(ps2dev->serio); | 194 | serio_pause_rx(ps2dev->serio); |
195 | ps2dev->flags = command == PS2_CMD_GETID ? PS2_FLAG_WAITID : 0; | 195 | ps2dev->flags = command == PS2_CMD_GETID ? PS2_FLAG_WAITID : 0; |
@@ -296,6 +296,7 @@ EXPORT_SYMBOL(ps2_schedule_command); | |||
296 | void ps2_init(struct ps2dev *ps2dev, struct serio *serio) | 296 | void ps2_init(struct ps2dev *ps2dev, struct serio *serio) |
297 | { | 297 | { |
298 | mutex_init(&ps2dev->cmd_mutex); | 298 | mutex_init(&ps2dev->cmd_mutex); |
299 | lockdep_set_subclass(&ps2dev->cmd_mutex, serio->depth); | ||
299 | init_waitqueue_head(&ps2dev->wait); | 300 | init_waitqueue_head(&ps2dev->wait); |
300 | ps2dev->serio = serio; | 301 | ps2dev->serio = serio; |
301 | } | 302 | } |
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 960fae3c3cea..211943f85cb6 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c | |||
@@ -118,6 +118,8 @@ static int serio_match_port(const struct serio_device_id *ids, struct serio *ser | |||
118 | 118 | ||
119 | static void serio_bind_driver(struct serio *serio, struct serio_driver *drv) | 119 | static void serio_bind_driver(struct serio *serio, struct serio_driver *drv) |
120 | { | 120 | { |
121 | int error; | ||
122 | |||
121 | down_write(&serio_bus.subsys.rwsem); | 123 | down_write(&serio_bus.subsys.rwsem); |
122 | 124 | ||
123 | if (serio_match_port(drv->id_table, serio)) { | 125 | if (serio_match_port(drv->id_table, serio)) { |
@@ -126,9 +128,19 @@ static void serio_bind_driver(struct serio *serio, struct serio_driver *drv) | |||
126 | serio->dev.driver = NULL; | 128 | serio->dev.driver = NULL; |
127 | goto out; | 129 | goto out; |
128 | } | 130 | } |
129 | device_bind_driver(&serio->dev); | 131 | error = device_bind_driver(&serio->dev); |
132 | if (error) { | ||
133 | printk(KERN_WARNING | ||
134 | "serio: device_bind_driver() failed " | ||
135 | "for %s (%s) and %s, error: %d\n", | ||
136 | serio->phys, serio->name, | ||
137 | drv->description, error); | ||
138 | serio_disconnect_driver(serio); | ||
139 | serio->dev.driver = NULL; | ||
140 | goto out; | ||
141 | } | ||
130 | } | 142 | } |
131 | out: | 143 | out: |
132 | up_write(&serio_bus.subsys.rwsem); | 144 | up_write(&serio_bus.subsys.rwsem); |
133 | } | 145 | } |
134 | 146 | ||
@@ -538,8 +550,12 @@ static void serio_init_port(struct serio *serio) | |||
538 | "serio%ld", (long)atomic_inc_return(&serio_no) - 1); | 550 | "serio%ld", (long)atomic_inc_return(&serio_no) - 1); |
539 | serio->dev.bus = &serio_bus; | 551 | serio->dev.bus = &serio_bus; |
540 | serio->dev.release = serio_release_port; | 552 | serio->dev.release = serio_release_port; |
541 | if (serio->parent) | 553 | if (serio->parent) { |
542 | serio->dev.parent = &serio->parent->dev; | 554 | serio->dev.parent = &serio->parent->dev; |
555 | serio->depth = serio->parent->depth + 1; | ||
556 | } else | ||
557 | serio->depth = 0; | ||
558 | lockdep_set_subclass(&serio->lock, serio->depth); | ||
543 | } | 559 | } |
544 | 560 | ||
545 | /* | 561 | /* |
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index ca79b2246195..66121f6a89ad 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c | |||
@@ -219,7 +219,7 @@ static void ts_interrupt_main(struct corgi_ts *corgi_ts, int isTimer) | |||
219 | static void corgi_ts_timer(unsigned long data) | 219 | static void corgi_ts_timer(unsigned long data) |
220 | { | 220 | { |
221 | struct corgi_ts *corgits_data = (struct corgi_ts *) data; | 221 | struct corgi_ts *corgits_data = (struct corgi_ts *) data; |
222 | ts_interrupt_main(corgits_data, 1, NULL); | 222 | ts_interrupt_main(corgits_data, 1); |
223 | } | 223 | } |
224 | 224 | ||
225 | static irqreturn_t ts_interrupt(int irq, void *dev_id) | 225 | static irqreturn_t ts_interrupt(int irq, void *dev_id) |
@@ -237,7 +237,7 @@ static int corgits_suspend(struct platform_device *dev, pm_message_t state) | |||
237 | if (corgi_ts->pendown) { | 237 | if (corgi_ts->pendown) { |
238 | del_timer_sync(&corgi_ts->timer); | 238 | del_timer_sync(&corgi_ts->timer); |
239 | corgi_ts->tc.pressure = 0; | 239 | corgi_ts->tc.pressure = 0; |
240 | new_data(corgi_ts, NULL); | 240 | new_data(corgi_ts); |
241 | corgi_ts->pendown = 0; | 241 | corgi_ts->pendown = 0; |
242 | } | 242 | } |
243 | corgi_ts->power_mode = PWR_MODE_SUSPEND; | 243 | corgi_ts->power_mode = PWR_MODE_SUSPEND; |
diff --git a/drivers/input/touchscreen/hp680_ts_input.c b/drivers/input/touchscreen/hp680_ts_input.c index e31c6c55b2e2..58fca316786c 100644 --- a/drivers/input/touchscreen/hp680_ts_input.c +++ b/drivers/input/touchscreen/hp680_ts_input.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <asm/io.h> | 6 | #include <asm/io.h> |
7 | #include <asm/delay.h> | 7 | #include <asm/delay.h> |
8 | #include <asm/adc.h> | 8 | #include <asm/adc.h> |
9 | #include <asm/hp6xx/hp6xx.h> | 9 | #include <asm/hp6xx.h> |
10 | 10 | ||
11 | #define MODNAME "hp680_ts_input" | 11 | #define MODNAME "hp680_ts_input" |
12 | 12 | ||