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:
Sean Young 2022-04-07 10:43:38 +02:00 committed by Mauro Carvalho Chehab
parent 6c1c1eb8c8
commit 2a952d92f7
1 changed files with 6 additions and 1 deletions

View File

@ -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;
}
}