projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c1c1eb
)
media: gpio-ir-tx: simplify wait logic
author
Sean Young
<sean@mess.org>
Thu, 7 Apr 2022 08:43:38 +0000
(10:43 +0200)
committer
Mauro Carvalho Chehab
<mchehab@kernel.org>
Sun, 8 May 2022 05:07:16 +0000
(07:07 +0200)
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>
drivers/media/rc/gpio-ir-tx.c
patch
|
blob
|
history
diff --git
a/drivers/media/rc/gpio-ir-tx.c
b/drivers/media/rc/gpio-ir-tx.c
index
a50701c
..
d3063dd
100644
(file)
--- a/
drivers/media/rc/gpio-ir-tx.c
+++ b/
drivers/media/rc/gpio-ir-tx.c
@@
-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;
}
}