[PATCH][V4L] keep tvaudio driver away from saa7146

From: Michael Hunold
Date: Thu Nov 04 2004 - 02:38:25 EST


Hi all,

the attached patch keeps the tvaudio i2c helper module away from any saa7146 based framegrabber. All saa7146 drivers have their dedicated i2c helper modules and don't work together with tvaudio, so keep it away alltogether. This will make mixed-card configurations work.

The patch was discussed and ack'ed by Gerd Knorr.

Please apply.

Thanks
Michael.

- [V4L] don't attach tvaudio module on saa7146 i2c busses

Signed-off-by: Michael Hunold <hunold@xxxxxxxxxxx>
Acked-by: Gerd Knorr <kraxel@xxxxxxxxxxx>

diff -ura b/drivers/media/video/tvaudio.c linux-2.6.10-rc1-bk9-debug/drivers/media/video/tvaudio.c
--- b/drivers/media/video/tvaudio.c 2004-11-01 16:54:04.000000000 +0100
+++ linux-2.6.10-rc1-bk9-debug/drivers/media/video/tvaudio.c 2004-11-01 16:56:09.000000000 +0100
@@ -1497,6 +1497,10 @@

static int chip_probe(struct i2c_adapter *adap)
{
+ /* don't attach on saa7146 based cards,
+ because dedicated drivers are used */
+ if ((adap->id & I2C_ALGO_SAA7146))
+ return 0;
#ifdef I2C_CLASS_TV_ANALOG
if (adap->class & I2C_CLASS_TV_ANALOG)
return i2c_probe(adap, &addr_data, chip_attach);