This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: gpio-ir-tx: simplify wait logic
Author:  Sean Young <[email protected]>
Date:    Thu Apr 7 10:43:38 2022 +0200

Do not handroll mdelay().

Suggested-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Sean Young <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/rc/gpio-ir-tx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/rc/gpio-ir-tx.c b/drivers/media/rc/gpio-ir-tx.c
index a50701cfbbd7..d3063ddb472e 100644
--- 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;
        }
 }
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to