diff options
-rw-r--r-- | linux/drivers/media/common/saa7146_i2c.c | 9 | ||||
-rw-r--r-- | linux/include/media/saa7146.h | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c index 699fedd32..6e991a90f 100644 --- a/linux/drivers/media/common/saa7146_i2c.c +++ b/linux/drivers/media/common/saa7146_i2c.c @@ -400,7 +400,7 @@ static struct i2c_algorithm saa7146_algo = { .functionality = saa7146_i2c_func, }; -int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate) +int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, unsigned int class, u32 bitrate) { DEB_EE(("bitrate: 0x%08x\n",bitrate)); @@ -414,19 +414,16 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c memset(i2c_adapter,0,sizeof(struct i2c_adapter)); strcpy(i2c_adapter->name, dev->name); #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - i2c_adapter->data = dev; + i2c_adapter->data = dev; #else i2c_set_adapdata(i2c_adapter,dev); + i2c_adapter->class = class; #endif i2c_adapter->algo = &saa7146_algo; i2c_adapter->algo_data = NULL; i2c_adapter->id = I2C_ALGO_SAA7146; i2c_adapter->timeout = SAA7146_I2C_TIMEOUT; i2c_adapter->retries = SAA7146_I2C_RETRIES; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#else - i2c_adapter->class = I2C_ADAP_CLASS_TV_ANALOG; -#endif } return 0; diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h index b3019ceb7..ef7271db6 100644 --- a/linux/include/media/saa7146.h +++ b/linux/include/media/saa7146.h @@ -154,7 +154,7 @@ struct saa7146_dev }; /* from saa7146_i2c.c */ -int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate); +int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, unsigned int class, u32 bitrate); int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg msgs[], int num, int retries); /* from saa7146_core.c */ |