diff mbox

[4/4] fc0011: Return early, if the frequency is already tuned

Message ID 20130207172106.1c8f4dd7@milhouse (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Büsch Feb. 7, 2013, 4:21 p.m. UTC
Return early, if we already tuned to a frequency.

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

---
diff mbox

Patch

Index: linux/drivers/media/tuners/fc0011.c
===================================================================
--- linux.orig/drivers/media/tuners/fc0011.c	2013-01-01 23:25:40.000000000 +0100
+++ linux/drivers/media/tuners/fc0011.c	2013-01-01 23:27:44.985089712 +0100
@@ -187,6 +187,9 @@ 
 	u8 fa, fp, vco_sel, vco_cal;
 	u8 regs[FC11_NR_REGS] = { };
 
+	if (priv->frequency == p->frequency)
+		return 0;
+
 	regs[FC11_REG_7] = 0x0F;
 	regs[FC11_REG_8] = 0x3E;
 	regs[FC11_REG_10] = 0xB8;