public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] af9035: Use usleep_range() in fc0011 support code
@ 2012-04-03  9:11 Michael Büsch
  2012-04-03 10:20 ` Antti Palosaari
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Büsch @ 2012-04-03  9:11 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: linux-media

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] af9035: Use usleep_range() in fc0011 support code
  2012-04-03  9:11 [PATCH] af9035: Use usleep_range() in fc0011 support code Michael Büsch
@ 2012-04-03 10:20 ` Antti Palosaari
  0 siblings, 0 replies; 2+ messages in thread
From: Antti Palosaari @ 2012-04-03 10:20 UTC (permalink / raw)
  To: Michael Büsch; +Cc: linux-media

On 03.04.2012 12:11, Michael Büsch wrote:
> Use usleep_range() instead of msleep() to improve power saving opportunities.
>
> Signed-off-by: Michael Buesch<m@bues.ch>

Applied thanks!
http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs/heads/af9035_experimental

regards
Antti
-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-03 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-03  9:11 [PATCH] af9035: Use usleep_range() in fc0011 support code Michael Büsch
2012-04-03 10:20 ` Antti Palosaari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox