Commit 2a952d92 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

media: gpio-ir-tx: simplify wait logic

Do not handroll mdelay().
Suggested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 6c1c1eb8
...@@ -62,8 +62,13 @@ static void delay_until(ktime_t until) ...@@ -62,8 +62,13 @@ static void delay_until(ktime_t until)
return; return;
/* udelay more than 1ms may not work */ /* udelay more than 1ms may not work */
delta = min(delta, 1000); if (delta >= 1000) {
mdelay(delta / 1000);
continue;
}
udelay(delta); udelay(delta);
break;
} }
} }
......
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