diff options
Diffstat (limited to 'drivers/media/common/saa7146_i2c.c')
| -rw-r--r-- | drivers/media/common/saa7146_i2c.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c index 6284894505c6..fec6beab8c28 100644 --- a/drivers/media/common/saa7146_i2c.c +++ b/drivers/media/common/saa7146_i2c.c | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | #include <linux/version.h> | ||
| 2 | #include <media/saa7146_vv.h> | 1 | #include <media/saa7146_vv.h> |
| 3 | 2 | ||
| 4 | static u32 saa7146_i2c_func(struct i2c_adapter *adapter) | 3 | static u32 saa7146_i2c_func(struct i2c_adapter *adapter) |
| @@ -402,12 +401,9 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c | |||
| 402 | saa7146_i2c_reset(dev); | 401 | saa7146_i2c_reset(dev); |
| 403 | 402 | ||
| 404 | if( NULL != i2c_adapter ) { | 403 | if( NULL != i2c_adapter ) { |
| 405 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) | ||
| 406 | i2c_adapter->data = dev; | ||
| 407 | #else | ||
| 408 | BUG_ON(!i2c_adapter->class); | 404 | BUG_ON(!i2c_adapter->class); |
| 409 | i2c_set_adapdata(i2c_adapter,dev); | 405 | i2c_set_adapdata(i2c_adapter,dev); |
| 410 | #endif | 406 | i2c_adapter->dev.parent = &dev->pci->dev; |
| 411 | i2c_adapter->algo = &saa7146_algo; | 407 | i2c_adapter->algo = &saa7146_algo; |
| 412 | i2c_adapter->algo_data = NULL; | 408 | i2c_adapter->algo_data = NULL; |
| 413 | i2c_adapter->id = I2C_HW_SAA7146; | 409 | i2c_adapter->id = I2C_HW_SAA7146; |
