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