summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@hauppauge.com>2010-07-12 18:31:56 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 03:17:22 (GMT)
commitcc355753e860559744baf5ddb2fcf427433e0346 (patch)
treee1ac13f8195bfb4334e210b3a42ec3af5728d437 /drivers
parent435b4f7897b7e2f233c313e65ac82bd1d3599c43 (diff)
downloadlinux-fsl-qoriq-cc355753e860559744baf5ddb2fcf427433e0346.tar.xz
[media] cx231xx: Clear avmode bits before setting
We need to clear out the field before setting individual bits, or else we end up with a union of whatever was there and what we are trying to set. For example, switching to digital mode ends up being 0x30 instead of 0x10 if we were previously in analog tv mode. Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-avcore.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c
index 362a431..146e52e 100644
--- a/drivers/media/video/cx231xx/cx231xx-avcore.c
+++ b/drivers/media/video/cx231xx/cx231xx-avcore.c
@@ -2392,6 +2392,7 @@ int cx231xx_set_power_mode(struct cx231xx *dev, enum AV_MODE mode)
msleep(PWR_SLEEP_INTERVAL);
}
+ tmp &= (~PWR_AV_MODE);
tmp |= POLARIS_AVMODE_DIGITAL | I2C_DEMOD_EN;
value[0] = (u8) tmp;
value[1] = (u8) (tmp >> 8);