From 322a72b2cfc8911cfb40781716197551ff3e4504 Mon Sep 17 00:00:00 2001 From: Mike Isely Date: Thu, 20 Apr 2006 00:24:23 -0500 Subject: Keep the cx25840 I2C filter around in pvrusb2 From: Mike Isely Modify the I2C filter for cx25840 such that it stays around rather than going away after the initial sanity check has passed. Signed-off-by: Mike Isely --- linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c index 232dea53f..4f1f4b000 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c @@ -234,6 +234,10 @@ static int i2c_hack_cx25840(struct pvr2_hdw *hdw, return 0; } + if (state == 3) { + return pvr2_i2c_basic_op(hdw,i2c_addr,wdata,wlen,rdata,rlen); + } + /* We're looking for the exact pattern where the revision register is being read. The cx25840 module will always look at the revision register first. Any other pattern of access therefore @@ -283,11 +287,9 @@ static int i2c_hack_cx25840(struct pvr2_hdw *hdw, goto fail; } - /* Success! Now let's just step out of the way and let the cx25840 - module do its work normally from now on... */ - pvr2_trace(PVR2_TRACE_INIT,"cx25840 appears to be OK," - " dropping its I2C filter"); - hdw->i2c_func[0x44] = pvr2_i2c_basic_op; + /* Success! */ + pvr2_trace(PVR2_TRACE_CHIPS,"cx25840 appears to be OK."); + state = 3; success: hdw->i2c_cx25840_hack_state = state; -- cgit v1.2.3