summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Büsch <m@bues.ch>2013-02-07 16:21:06 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-08 20:51:36 +0100
commita92591a7112042f92b609be42bc332d989776e9b (patch)
treef34933b52d83e4080807c89b6f30845885ad26a6 /drivers
parent[media] fc0011: Add some sanity checks and cleanups (diff)
downloadlinux-a92591a7112042f92b609be42bc332d989776e9b.tar.xz
linux-a92591a7112042f92b609be42bc332d989776e9b.zip
[media] fc0011: Return early, if the frequency is already tuned
Return early, if we already tuned to a frequency. Signed-off-by: Michael Buesch <m@bues.ch> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/tuners/fc0011.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/tuners/fc0011.c b/drivers/media/tuners/fc0011.c
index 3932aa81e18c..18caab11c94b 100644
--- a/drivers/media/tuners/fc0011.c
+++ b/drivers/media/tuners/fc0011.c
@@ -187,6 +187,9 @@ static int fc0011_set_params(struct dvb_frontend *fe)
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;