diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-11 13:22:21 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-16 21:33:59 -0300 |
commit | 4176e7ea8885a3cb3f5bbbf28480b421ef9b8f47 (patch) | |
tree | 9f6a9dd23a918e935b0195c7299d5e69076c2bd4 /drivers/media | |
parent | 52775fd5b599c79e9a4152f75a6426bf376198dc (diff) | |
download | op-kernel-dev-4176e7ea8885a3cb3f5bbbf28480b421ef9b8f47.zip op-kernel-dev-4176e7ea8885a3cb3f5bbbf28480b421ef9b8f47.tar.gz |
[media] r820t: avoid rewrite all regs when not needed
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tested-by: Antti Palosaari <crope@iki.fi>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/tuners/r820t.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c index 2e6a690..fc660f2 100644 --- a/drivers/media/tuners/r820t.c +++ b/drivers/media/tuners/r820t.c @@ -2006,18 +2006,17 @@ static int r820t_imr_callibrate(struct r820t_priv *priv) if (priv->init_done) return 0; - /* Initialize registers */ - rc = r820t_write(priv, 0x05, - r820t_init_array, sizeof(r820t_init_array)); - if (rc < 0) - return rc; - /* Detect Xtal capacitance */ if ((priv->cfg->rafael_chip == CHIP_R820T) || (priv->cfg->rafael_chip == CHIP_R828S) || (priv->cfg->rafael_chip == CHIP_R820C)) { priv->xtal_cap_sel = XTAL_HIGH_CAP_0P; } else { + /* Initialize registers */ + rc = r820t_write(priv, 0x05, + r820t_init_array, sizeof(r820t_init_array)); + if (rc < 0) + return rc; for (i = 0; i < 3; i++) { rc = r820t_xtal_check(priv); if (rc < 0) |