aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2010-02-26 14:04:15 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-02-26 14:06:24 -0500
commita7790532f5b7358c33a6b1834dc2b318de209f31 (patch)
tree0ceb9e24b3f54cb5c8453fb5a218e2a94a0f1cce /drivers/input/serio
parent2764fb4244cc1bc08df3667924ca4a972e90ac70 (diff)
parent60b341b778cc2929df16c0a504c91621b3c6a4ad (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
The SmartMedia FTL code depends on new kfifo bits from 2.6.33
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/altera_ps2.c15
-rw-r--r--drivers/input/serio/ambakmi.c9
-rw-r--r--drivers/input/serio/at32psif.c3
-rw-r--r--drivers/input/serio/gscps2.c6
-rw-r--r--drivers/input/serio/hil_mlc.c8
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h15
-rw-r--r--drivers/input/serio/i8042.c96
-rw-r--r--drivers/input/serio/sa1111ps2.c10
-rw-r--r--drivers/input/serio/serio.c11
9 files changed, 131 insertions, 42 deletions
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c
index f479ea50919f..320b7ca48bf8 100644
--- a/drivers/input/serio/altera_ps2.c
+++ b/drivers/input/serio/altera_ps2.c
@@ -79,11 +79,11 @@ static void altera_ps2_close(struct serio *io)
79/* 79/*
80 * Add one device to this driver. 80 * Add one device to this driver.
81 */ 81 */
82static int altera_ps2_probe(struct platform_device *pdev) 82static int __devinit altera_ps2_probe(struct platform_device *pdev)
83{ 83{
84 struct ps2if *ps2if; 84 struct ps2if *ps2if;
85 struct serio *serio; 85 struct serio *serio;
86 int error; 86 int error, irq;
87 87
88 ps2if = kzalloc(sizeof(struct ps2if), GFP_KERNEL); 88 ps2if = kzalloc(sizeof(struct ps2if), GFP_KERNEL);
89 serio = kzalloc(sizeof(struct serio), GFP_KERNEL); 89 serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
@@ -108,11 +108,13 @@ static int altera_ps2_probe(struct platform_device *pdev)
108 goto err_free_mem; 108 goto err_free_mem;
109 } 109 }
110 110
111 ps2if->irq = platform_get_irq(pdev, 0); 111
112 if (ps2if->irq < 0) { 112 irq = platform_get_irq(pdev, 0);
113 if (irq < 0) {
113 error = -ENXIO; 114 error = -ENXIO;
114 goto err_free_mem; 115 goto err_free_mem;
115 } 116 }
117 ps2if->irq = irq;
116 118
117 if (!request_mem_region(ps2if->iomem_res->start, 119 if (!request_mem_region(ps2if->iomem_res->start,
118 resource_size(ps2if->iomem_res), pdev->name)) { 120 resource_size(ps2if->iomem_res), pdev->name)) {
@@ -155,7 +157,7 @@ static int altera_ps2_probe(struct platform_device *pdev)
155/* 157/*
156 * Remove one device from this driver. 158 * Remove one device from this driver.
157 */ 159 */
158static int altera_ps2_remove(struct platform_device *pdev) 160static int __devexit altera_ps2_remove(struct platform_device *pdev)
159{ 161{
160 struct ps2if *ps2if = platform_get_drvdata(pdev); 162 struct ps2if *ps2if = platform_get_drvdata(pdev);
161 163
@@ -175,9 +177,10 @@ static int altera_ps2_remove(struct platform_device *pdev)
175 */ 177 */
176static struct platform_driver altera_ps2_driver = { 178static struct platform_driver altera_ps2_driver = {
177 .probe = altera_ps2_probe, 179 .probe = altera_ps2_probe,
178 .remove = altera_ps2_remove, 180 .remove = __devexit_p(altera_ps2_remove),
179 .driver = { 181 .driver = {
180 .name = DRV_NAME, 182 .name = DRV_NAME,
183 .owner = THIS_MODULE,
181 }, 184 },
182}; 185};
183 186
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index 89b394183a75..92563a681d65 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(kmi->clk); 107 clk_disable(kmi->clk);
108} 108}
109 109
110static int amba_kmi_probe(struct amba_device *dev, struct amba_id *id) 110static int __devinit amba_kmi_probe(struct amba_device *dev, struct amba_id *id)
111{ 111{
112 struct amba_kmi_port *kmi; 112 struct amba_kmi_port *kmi;
113 struct serio *io; 113 struct serio *io;
@@ -134,7 +134,7 @@ static int amba_kmi_probe(struct amba_device *dev, struct amba_id *id)
134 io->port_data = kmi; 134 io->port_data = kmi;
135 io->dev.parent = &dev->dev; 135 io->dev.parent = &dev->dev;
136 136
137 kmi->io = io; 137 kmi->io = io;
138 kmi->base = ioremap(dev->res.start, resource_size(&dev->res)); 138 kmi->base = ioremap(dev->res.start, resource_size(&dev->res));
139 if (!kmi->base) { 139 if (!kmi->base) {
140 ret = -ENOMEM; 140 ret = -ENOMEM;
@@ -162,7 +162,7 @@ static int amba_kmi_probe(struct amba_device *dev, struct amba_id *id)
162 return ret; 162 return ret;
163} 163}
164 164
165static int amba_kmi_remove(struct amba_device *dev) 165static int __devexit amba_kmi_remove(struct amba_device *dev)
166{ 166{
167 struct amba_kmi_port *kmi = amba_get_drvdata(dev); 167 struct amba_kmi_port *kmi = amba_get_drvdata(dev);
168 168
@@ -197,10 +197,11 @@ static struct amba_id amba_kmi_idtable[] = {
197static struct amba_driver ambakmi_driver = { 197static struct amba_driver ambakmi_driver = {
198 .drv = { 198 .drv = {
199 .name = "kmi-pl050", 199 .name = "kmi-pl050",
200 .owner = THIS_MODULE,
200 }, 201 },
201 .id_table = amba_kmi_idtable, 202 .id_table = amba_kmi_idtable,
202 .probe = amba_kmi_probe, 203 .probe = amba_kmi_probe,
203 .remove = amba_kmi_remove, 204 .remove = __devexit_p(amba_kmi_remove),
204 .resume = amba_kmi_resume, 205 .resume = amba_kmi_resume,
205}; 206};
206 207
diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c
index a6fb7a3dcc46..b54452a8c771 100644
--- a/drivers/input/serio/at32psif.c
+++ b/drivers/input/serio/at32psif.c
@@ -137,7 +137,7 @@ static int psif_write(struct serio *io, unsigned char val)
137 spin_lock_irqsave(&psif->lock, flags); 137 spin_lock_irqsave(&psif->lock, flags);
138 138
139 while (!(psif_readl(psif, SR) & PSIF_BIT(TXEMPTY)) && timeout--) 139 while (!(psif_readl(psif, SR) & PSIF_BIT(TXEMPTY)) && timeout--)
140 msleep(10); 140 udelay(50);
141 141
142 if (timeout >= 0) { 142 if (timeout >= 0) {
143 psif_writel(psif, THR, val); 143 psif_writel(psif, THR, val);
@@ -352,6 +352,7 @@ static struct platform_driver psif_driver = {
352 .remove = __exit_p(psif_remove), 352 .remove = __exit_p(psif_remove),
353 .driver = { 353 .driver = {
354 .name = "atmel_psif", 354 .name = "atmel_psif",
355 .owner = THIS_MODULE,
355 }, 356 },
356 .suspend = psif_suspend, 357 .suspend = psif_suspend,
357 .resume = psif_resume, 358 .resume = psif_resume,
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c
index bd0f92d9f40f..06addfa7cc47 100644
--- a/drivers/input/serio/gscps2.c
+++ b/drivers/input/serio/gscps2.c
@@ -6,7 +6,7 @@
6 * Copyright (c) 2002 Thibaut Varene <varenet@parisc-linux.org> 6 * Copyright (c) 2002 Thibaut Varene <varenet@parisc-linux.org>
7 * 7 *
8 * Pieces of code based on linux-2.4's hp_mouse.c & hp_keyb.c 8 * Pieces of code based on linux-2.4's hp_mouse.c & hp_keyb.c
9 * Copyright (c) 1999 Alex deVries <alex@onefishtwo.ca> 9 * Copyright (c) 1999 Alex deVries <alex@onefishtwo.ca>
10 * Copyright (c) 1999-2000 Philipp Rumpf <prumpf@tux.org> 10 * Copyright (c) 1999-2000 Philipp Rumpf <prumpf@tux.org>
11 * Copyright (c) 2000 Xavier Debacker <debackex@esiee.fr> 11 * Copyright (c) 2000 Xavier Debacker <debackex@esiee.fr>
12 * Copyright (c) 2000-2001 Thomas Marteau <marteaut@esiee.fr> 12 * Copyright (c) 2000-2001 Thomas Marteau <marteaut@esiee.fr>
@@ -326,7 +326,7 @@ static void gscps2_close(struct serio *port)
326 * @return: success/error report 326 * @return: success/error report
327 */ 327 */
328 328
329static int __init gscps2_probe(struct parisc_device *dev) 329static int __devinit gscps2_probe(struct parisc_device *dev)
330{ 330{
331 struct gscps2port *ps2port; 331 struct gscps2port *ps2port;
332 struct serio *serio; 332 struct serio *serio;
@@ -443,7 +443,7 @@ static struct parisc_driver parisc_ps2_driver = {
443 .name = "gsc_ps2", 443 .name = "gsc_ps2",
444 .id_table = gscps2_device_tbl, 444 .id_table = gscps2_device_tbl,
445 .probe = gscps2_probe, 445 .probe = gscps2_probe,
446 .remove = gscps2_remove, 446 .remove = __devexit_p(gscps2_remove),
447}; 447};
448 448
449static int __init gscps2_init(void) 449static int __init gscps2_init(void)
diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c
index 7ba9f2b2c041..6cd03ebaf5fb 100644
--- a/drivers/input/serio/hil_mlc.c
+++ b/drivers/input/serio/hil_mlc.c
@@ -993,10 +993,8 @@ int hil_mlc_unregister(hil_mlc *mlc)
993 993
994static int __init hil_mlc_init(void) 994static int __init hil_mlc_init(void)
995{ 995{
996 init_timer(&hil_mlcs_kicker); 996 setup_timer(&hil_mlcs_kicker, &hil_mlcs_timer, 0);
997 hil_mlcs_kicker.expires = jiffies + HZ; 997 mod_timer(&hil_mlcs_kicker, jiffies + HZ);
998 hil_mlcs_kicker.function = &hil_mlcs_timer;
999 add_timer(&hil_mlcs_kicker);
1000 998
1001 tasklet_enable(&hil_mlcs_tasklet); 999 tasklet_enable(&hil_mlcs_tasklet);
1002 1000
@@ -1005,7 +1003,7 @@ static int __init hil_mlc_init(void)
1005 1003
1006static void __exit hil_mlc_exit(void) 1004static void __exit hil_mlc_exit(void)
1007{ 1005{
1008 del_timer(&hil_mlcs_kicker); 1006 del_timer_sync(&hil_mlcs_kicker);
1009 1007
1010 tasklet_disable(&hil_mlcs_tasklet); 1008 tasklet_disable(&hil_mlcs_tasklet);
1011 tasklet_kill(&hil_mlcs_tasklet); 1009 tasklet_kill(&hil_mlcs_tasklet);
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 7fbffe431bc5..2a5982e532f8 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -158,6 +158,14 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {
158 }, 158 },
159 }, 159 },
160 { 160 {
161 /* Gigabyte M1022M netbook */
162 .matches = {
163 DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co.,Ltd."),
164 DMI_MATCH(DMI_BOARD_NAME, "M1022E"),
165 DMI_MATCH(DMI_BOARD_VERSION, "1.02"),
166 },
167 },
168 {
161 .matches = { 169 .matches = {
162 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 170 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
163 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"), 171 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"),
@@ -516,6 +524,13 @@ static const struct dmi_system_id __initconst i8042_dmi_laptop_table[] = {
516 */ 524 */
517static const struct dmi_system_id __initconst i8042_dmi_dritek_table[] = { 525static const struct dmi_system_id __initconst i8042_dmi_dritek_table[] = {
518 { 526 {
527 /* Acer Aspire 5610 */
528 .matches = {
529 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
530 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"),
531 },
532 },
533 {
519 /* Acer Aspire 5630 */ 534 /* Acer Aspire 5630 */
520 .matches = { 535 .matches = {
521 DMI_MATCH(DMI_SYS_VENDOR, "Acer"), 536 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 1df02d25aca5..b54aee7cd9e3 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -126,6 +126,8 @@ static unsigned char i8042_suppress_kbd_ack;
126static struct platform_device *i8042_platform_device; 126static struct platform_device *i8042_platform_device;
127 127
128static irqreturn_t i8042_interrupt(int irq, void *dev_id); 128static irqreturn_t i8042_interrupt(int irq, void *dev_id);
129static bool (*i8042_platform_filter)(unsigned char data, unsigned char str,
130 struct serio *serio);
129 131
130void i8042_lock_chip(void) 132void i8042_lock_chip(void)
131{ 133{
@@ -139,6 +141,48 @@ void i8042_unlock_chip(void)
139} 141}
140EXPORT_SYMBOL(i8042_unlock_chip); 142EXPORT_SYMBOL(i8042_unlock_chip);
141 143
144int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str,
145 struct serio *serio))
146{
147 unsigned long flags;
148 int ret = 0;
149
150 spin_lock_irqsave(&i8042_lock, flags);
151
152 if (i8042_platform_filter) {
153 ret = -EBUSY;
154 goto out;
155 }
156
157 i8042_platform_filter = filter;
158
159out:
160 spin_unlock_irqrestore(&i8042_lock, flags);
161 return ret;
162}
163EXPORT_SYMBOL(i8042_install_filter);
164
165int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str,
166 struct serio *port))
167{
168 unsigned long flags;
169 int ret = 0;
170
171 spin_lock_irqsave(&i8042_lock, flags);
172
173 if (i8042_platform_filter != filter) {
174 ret = -EINVAL;
175 goto out;
176 }
177
178 i8042_platform_filter = NULL;
179
180out:
181 spin_unlock_irqrestore(&i8042_lock, flags);
182 return ret;
183}
184EXPORT_SYMBOL(i8042_remove_filter);
185
142/* 186/*
143 * The i8042_wait_read() and i8042_wait_write functions wait for the i8042 to 187 * The i8042_wait_read() and i8042_wait_write functions wait for the i8042 to
144 * be ready for reading values from it / writing values to it. 188 * be ready for reading values from it / writing values to it.
@@ -369,6 +413,31 @@ static void i8042_stop(struct serio *serio)
369} 413}
370 414
371/* 415/*
416 * i8042_filter() filters out unwanted bytes from the input data stream.
417 * It is called from i8042_interrupt and thus is running with interrupts
418 * off and i8042_lock held.
419 */
420static bool i8042_filter(unsigned char data, unsigned char str,
421 struct serio *serio)
422{
423 if (unlikely(i8042_suppress_kbd_ack)) {
424 if ((~str & I8042_STR_AUXDATA) &&
425 (data == 0xfa || data == 0xfe)) {
426 i8042_suppress_kbd_ack--;
427 dbg("Extra keyboard ACK - filtered out\n");
428 return true;
429 }
430 }
431
432 if (i8042_platform_filter && i8042_platform_filter(data, str, serio)) {
433 dbg("Filtered out by platfrom filter\n");
434 return true;
435 }
436
437 return false;
438}
439
440/*
372 * i8042_interrupt() is the most important function in this driver - 441 * i8042_interrupt() is the most important function in this driver -
373 * it handles the interrupts from the i8042, and sends incoming bytes 442 * it handles the interrupts from the i8042, and sends incoming bytes
374 * to the upper layers. 443 * to the upper layers.
@@ -377,13 +446,16 @@ static void i8042_stop(struct serio *serio)
377static irqreturn_t i8042_interrupt(int irq, void *dev_id) 446static irqreturn_t i8042_interrupt(int irq, void *dev_id)
378{ 447{
379 struct i8042_port *port; 448 struct i8042_port *port;
449 struct serio *serio;
380 unsigned long flags; 450 unsigned long flags;
381 unsigned char str, data; 451 unsigned char str, data;
382 unsigned int dfl; 452 unsigned int dfl;
383 unsigned int port_no; 453 unsigned int port_no;
454 bool filtered;
384 int ret = 1; 455 int ret = 1;
385 456
386 spin_lock_irqsave(&i8042_lock, flags); 457 spin_lock_irqsave(&i8042_lock, flags);
458
387 str = i8042_read_status(); 459 str = i8042_read_status();
388 if (unlikely(~str & I8042_STR_OBF)) { 460 if (unlikely(~str & I8042_STR_OBF)) {
389 spin_unlock_irqrestore(&i8042_lock, flags); 461 spin_unlock_irqrestore(&i8042_lock, flags);
@@ -391,8 +463,8 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id)
391 ret = 0; 463 ret = 0;
392 goto out; 464 goto out;
393 } 465 }
466
394 data = i8042_read_data(); 467 data = i8042_read_data();
395 spin_unlock_irqrestore(&i8042_lock, flags);
396 468
397 if (i8042_mux_present && (str & I8042_STR_AUXDATA)) { 469 if (i8042_mux_present && (str & I8042_STR_AUXDATA)) {
398 static unsigned long last_transmit; 470 static unsigned long last_transmit;
@@ -441,21 +513,19 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id)
441 } 513 }
442 514
443 port = &i8042_ports[port_no]; 515 port = &i8042_ports[port_no];
516 serio = port->exists ? port->serio : NULL;
444 517
445 dbg("%02x <- i8042 (interrupt, %d, %d%s%s)", 518 dbg("%02x <- i8042 (interrupt, %d, %d%s%s)",
446 data, port_no, irq, 519 data, port_no, irq,
447 dfl & SERIO_PARITY ? ", bad parity" : "", 520 dfl & SERIO_PARITY ? ", bad parity" : "",
448 dfl & SERIO_TIMEOUT ? ", timeout" : ""); 521 dfl & SERIO_TIMEOUT ? ", timeout" : "");
449 522
450 if (unlikely(i8042_suppress_kbd_ack)) 523 filtered = i8042_filter(data, str, serio);
451 if (port_no == I8042_KBD_PORT_NO && 524
452 (data == 0xfa || data == 0xfe)) { 525 spin_unlock_irqrestore(&i8042_lock, flags);
453 i8042_suppress_kbd_ack--;
454 goto out;
455 }
456 526
457 if (likely(port->exists)) 527 if (likely(port->exists && !filtered))
458 serio_interrupt(port->serio, data, dfl); 528 serio_interrupt(serio, data, dfl);
459 529
460 out: 530 out:
461 return IRQ_RETVAL(ret); 531 return IRQ_RETVAL(ret);
@@ -1091,9 +1161,17 @@ static int i8042_pm_restore(struct device *dev)
1091 return 0; 1161 return 0;
1092} 1162}
1093 1163
1164static int i8042_pm_thaw(struct device *dev)
1165{
1166 i8042_interrupt(0, NULL);
1167
1168 return 0;
1169}
1170
1094static const struct dev_pm_ops i8042_pm_ops = { 1171static const struct dev_pm_ops i8042_pm_ops = {
1095 .suspend = i8042_pm_reset, 1172 .suspend = i8042_pm_reset,
1096 .resume = i8042_pm_restore, 1173 .resume = i8042_pm_restore,
1174 .thaw = i8042_pm_thaw,
1097 .poweroff = i8042_pm_reset, 1175 .poweroff = i8042_pm_reset,
1098 .restore = i8042_pm_restore, 1176 .restore = i8042_pm_restore,
1099}; 1177};
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c
index f412c69478a8..d55874e5d1c2 100644
--- a/drivers/input/serio/sa1111ps2.c
+++ b/drivers/input/serio/sa1111ps2.c
@@ -180,8 +180,8 @@ static void __devinit ps2_clear_input(struct ps2if *ps2if)
180 } 180 }
181} 181}
182 182
183static inline unsigned int 183static unsigned int __devinit ps2_test_one(struct ps2if *ps2if,
184ps2_test_one(struct ps2if *ps2if, unsigned int mask) 184 unsigned int mask)
185{ 185{
186 unsigned int val; 186 unsigned int val;
187 187
@@ -197,7 +197,7 @@ ps2_test_one(struct ps2if *ps2if, unsigned int mask)
197 * Test the keyboard interface. We basically check to make sure that 197 * Test the keyboard interface. We basically check to make sure that
198 * we can drive each line to the keyboard independently of each other. 198 * we can drive each line to the keyboard independently of each other.
199 */ 199 */
200static int __init ps2_test(struct ps2if *ps2if) 200static int __devinit ps2_test(struct ps2if *ps2if)
201{ 201{
202 unsigned int stat; 202 unsigned int stat;
203 int ret = 0; 203 int ret = 0;
@@ -312,7 +312,7 @@ static int __devinit ps2_probe(struct sa1111_dev *dev)
312/* 312/*
313 * Remove one device from this driver. 313 * Remove one device from this driver.
314 */ 314 */
315static int ps2_remove(struct sa1111_dev *dev) 315static int __devexit ps2_remove(struct sa1111_dev *dev)
316{ 316{
317 struct ps2if *ps2if = sa1111_get_drvdata(dev); 317 struct ps2if *ps2if = sa1111_get_drvdata(dev);
318 318
@@ -335,7 +335,7 @@ static struct sa1111_driver ps2_driver = {
335 }, 335 },
336 .devid = SA1111_DEVID_PS2, 336 .devid = SA1111_DEVID_PS2,
337 .probe = ps2_probe, 337 .probe = ps2_probe,
338 .remove = ps2_remove, 338 .remove = __devexit_p(ps2_remove),
339}; 339};
340 340
341static int __init ps2_init(void) 341static int __init ps2_init(void)
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index 0236f0d5fd91..e0f30186d513 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -284,13 +284,7 @@ static void serio_handle_event(void)
284 284
285 mutex_lock(&serio_mutex); 285 mutex_lock(&serio_mutex);
286 286
287 /* 287 while ((event = serio_get_event())) {
288 * Note that we handle only one event here to give swsusp
289 * a chance to freeze kseriod thread. Serio events should
290 * be pretty rare so we are not concerned about taking
291 * performance hit.
292 */
293 if ((event = serio_get_event())) {
294 288
295 switch (event->type) { 289 switch (event->type) {
296 case SERIO_REGISTER_PORT: 290 case SERIO_REGISTER_PORT:
@@ -380,10 +374,9 @@ static struct serio *serio_get_pending_child(struct serio *parent)
380 374
381static int serio_thread(void *nothing) 375static int serio_thread(void *nothing)
382{ 376{
383 set_freezable();
384 do { 377 do {
385 serio_handle_event(); 378 serio_handle_event();
386 wait_event_freezable(serio_wait, 379 wait_event_interruptible(serio_wait,
387 kthread_should_stop() || !list_empty(&serio_event_list)); 380 kthread_should_stop() || !list_empty(&serio_event_list));
388 } while (!kthread_should_stop()); 381 } while (!kthread_should_stop());
389 382