public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael Büsch" <m@bues.ch>
To: Antti Palosaari <crope@iki.fi>
Cc: linux-media <linux-media@vger.kernel.org>
Subject: [PATCH] af9035: Use usleep_range() in fc0011 support code
Date: Tue, 3 Apr 2012 11:11:30 +0200	[thread overview]
Message-ID: <20120403111130.6a41e347@milhouse> (raw)

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]

Use usleep_range() instead of msleep() to improve power saving opportunities.

Signed-off-by: Michael Buesch <m@bues.ch>

---

Index: linux/drivers/media/dvb/dvb-usb/af9035.c
===================================================================
--- linux.orig/drivers/media/dvb/dvb-usb/af9035.c	2012-04-03 10:49:18.270364916 +0200
+++ linux/drivers/media/dvb/dvb-usb/af9035.c	2012-04-03 10:49:57.495125781 +0200
@@ -590,7 +590,7 @@
 		err = af9035_wr_reg_mask(d, 0xd8d1, 1, 1);
 		if (err)
 			return err;
-		msleep(10);
+		usleep_range(10000, 50000);
 		break;
 	case FC0011_FE_CALLBACK_RESET:
 		err = af9035_wr_reg(d, 0xd8e9, 1);
@@ -602,11 +602,11 @@
 		err = af9035_wr_reg(d, 0xd8e7, 1);
 		if (err)
 			return err;
-		msleep(10);
+		usleep_range(10000, 20000);
 		err = af9035_wr_reg(d, 0xd8e7, 0);
 		if (err)
 			return err;
-		msleep(10);
+		usleep_range(10000, 20000);
 		break;
 	default:
 		return -EINVAL;


-- 
Greetings, Michael.

PGP encryption is encouraged / 908D8B0E

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2012-04-03  9:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03  9:11 Michael Büsch [this message]
2012-04-03 10:20 ` [PATCH] af9035: Use usleep_range() in fc0011 support code Antti Palosaari

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=20120403111130.6a41e347@milhouse \
    --to=m@bues.ch \
    --cc=crope@iki.fi \
    --cc=linux-media@vger.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