summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-av-firmware.c
diff options
context:
space:
mode:
authorAndy Walls2009-01-31 02:39:26 +0100
committerMauro Carvalho Chehab2009-03-30 17:42:38 +0200
commit072e6183c26cb00de0368a06cbbda2a2d55e6844 (patch)
tree9a7ca9c58baa36154a0f3b2f62fa486a0ebd4f3b /drivers/media/video/cx18/cx18-av-firmware.c
parentV4L/DVB (10433): cx18: Defer A/V core initialization until a valid cx18_av_cm... (diff)
downloadkernel-qcow2-linux-072e6183c26cb00de0368a06cbbda2a2d55e6844.tar.gz
kernel-qcow2-linux-072e6183c26cb00de0368a06cbbda2a2d55e6844.tar.xz
kernel-qcow2-linux-072e6183c26cb00de0368a06cbbda2a2d55e6844.zip
V4L/DVB (10434): cx18: Smarter verification of CX18_AUDIO_ENABLE register writes
The CX18_AUDIO_ENABLE register usually never reads back what was just written under normal circumstances. Perform better checking that a write went to the register as expected with a specification of what bits to verify. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-av-firmware.c')
-rw-r--r--drivers/media/video/cx18/cx18-av-firmware.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-av-firmware.c b/drivers/media/video/cx18/cx18-av-firmware.c
index b374c74d3e7b..940ea9352115 100644
--- a/drivers/media/video/cx18/cx18-av-firmware.c
+++ b/drivers/media/video/cx18/cx18-av-firmware.c
@@ -131,7 +131,8 @@ int cx18_av_loadfw(struct cx18 *cx)
v = cx18_read_reg(cx, CX18_AUDIO_ENABLE);
/* If bit 11 is 1, clear bit 10 */
if (v & 0x800)
- cx18_write_reg(cx, v & 0xFFFFFBFF, CX18_AUDIO_ENABLE);
+ cx18_write_reg_expect(cx, v & 0xFFFFFBFF, CX18_AUDIO_ENABLE,
+ 0, 0x400);
/* Enable WW auto audio standard detection */
v = cx18_av_read4(cx, CXADEC_STD_DET_CTL);