From cfe4730591564ebe99859d687a3dba2427dbb292 Mon Sep 17 00:00:00 2001 From: Michael Hunold Date: Fri, 14 Mar 2003 09:56:11 +0000 Subject: saa7146: set default values for brightness/contrast/saturation on driver load mxb: prevent helper modules to probe on unknown i2c-busses. (for example on a Matrox gfx card) --- linux/drivers/media/video/tda9840.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linux/drivers/media/video/tda9840.c') diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c index 6da68d762..85295ac2d 100644 --- a/linux/drivers/media/video/tda9840.c +++ b/linux/drivers/media/video/tda9840.c @@ -234,6 +234,12 @@ static int tda9840_detect(struct i2c_adapter *adapter, int address, unsigned sho static int tda9840_attach(struct i2c_adapter *adapter) { + /* let's see whether this is a know adapter we can attach to */ + if( adapter->id != I2C_ALGO_SAA7146 ) { + dprintk("tda9840.o: refusing to probe on unknown adapter [name='%s',id=0x%x]\n",adapter->name,adapter->id); + return -ENODEV; + } + return i2c_probe(adapter,&addr_data,&tda9840_detect); } -- cgit v1.2.3