Commit e47c4f70 authored by Dmitry Torokhov's avatar Dmitry Torokhov

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: default avatarMarjan Fojkar <marjan@pajkc.eu>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent a61cd038
......@@ -137,7 +137,7 @@ static int psif_write(struct serio *io, unsigned char val)
spin_lock_irqsave(&psif->lock, flags);
while (!(psif_readl(psif, SR) & PSIF_BIT(TXEMPTY)) && timeout--)
msleep(10);
udelay(50);
if (timeout >= 0) {
psif_writel(psif, THR, val);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment