mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
a61cd03827
commit
e47c4f70ea
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue