media: gpio-ir-tx: simplify wait logic
Do not handroll mdelay(). Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
6c1c1eb8c8
commit
2a952d92f7
|
@ -62,8 +62,13 @@ static void delay_until(ktime_t until)
|
|||
return;
|
||||
|
||||
/* udelay more than 1ms may not work */
|
||||
delta = min(delta, 1000);
|
||||
if (delta >= 1000) {
|
||||
mdelay(delta / 1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
udelay(delta);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue