mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Moreira" <andrem.33333@gmail.com>
To: mchehab@kernel.org, gregkh@linuxfoundation.org
Cc: linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	"André Moreira" <andrem.33333@gmail.com>
Subject: [PATCH 1/2] staging: media: av7110: replace msleep with usleep_range
Date: Fri, 19 Jun 2026 19:15:23 -0300	[thread overview]
Message-ID: <20260619221524.51814-1-andrem.33333@gmail.com> (raw)

The msleep() function is not precise for short delays under 20ms.
Replace it with usleep_range() to provide more accurate timing
and avoid unnecessary scheduler overhead.

Signed-off-by: André Moreira <andrem.33333@gmail.com>
---
 drivers/staging/media/av7110/av7110.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/av7110/av7110.c b/drivers/staging/media/av7110/av7110.c
index 862aee993889..e77be16f442c 100644
--- a/drivers/staging/media/av7110/av7110.c
+++ b/drivers/staging/media/av7110/av7110.c
@@ -1818,7 +1818,7 @@ static int nexusca_stv0297_tuner_set_params(struct dvb_frontend *fe)
 		if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1)
 			if (data[0] & 0x40)
 				break;
-		msleep(10);
+		usleep_range(10000, 11000);
 	}
 
 	return 0;
-- 
2.43.0


             reply	other threads:[~2026-06-19 22:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-19 22:15 André Moreira [this message]
2026-06-19 22:15 ` [PATCH 2/2] staging: media: av7110: refactor av7110_start_feed to reduce indentation André Moreira
2026-06-20  8:42   ` Dan Carpenter
2026-06-20 17:21     ` [PATCH v2] " André Moreira
2026-06-20 17:55     ` André Moreira
2026-06-20  9:40 ` [PATCH 1/2] staging: media: av7110: replace msleep with usleep_range Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260619221524.51814-1-andrem.33333@gmail.com \
    --to=andrem.33333@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®