aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-12-15 01:47:20 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-12-15 03:35:08 -0500
commite47c4f70ea41fd973eec80a9388a1347d3d27896 (patch)
treebaf261863ea13ccee04e2c150b68abb7034e2546 /drivers/input
parenta61cd03827eceefcec19eefc6e1173703fdc5e5d (diff)
Input: at32psif - do not sleep in atomic context
We can't use msleep() while holding a spinlock, moreower serio's write() method is supposed to be useable from inettrupt context. Let's do what i8042 does and poll the status register every 50 us (with udelay). Reported-by: Marjan Fojkar <marjan@pajkc.eu> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/serio/at32psif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c
index 50bdc00c49d7..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);