From: Devin Heitmueller Date: Mon, 12 Jul 2010 18:31:56 +0000 (-0300) Subject: [media] cx231xx: Clear avmode bits before setting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cc355753e860559744baf5ddb2fcf427433e0346;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c index 362a4311cdee..146e52e318eb 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);