diff options
Diffstat (limited to 'linux/drivers/media/video/tda9840.c')
-rw-r--r-- | linux/drivers/media/video/tda9840.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c index f6d27d581..b1fde87f3 100644 --- a/linux/drivers/media/video/tda9840.c +++ b/linux/drivers/media/video/tda9840.c @@ -57,7 +57,7 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); #define TDA9840_SET_BOTH_R 0x16 #define TDA9840_SET_EXTERNAL 0x7a -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x42, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; @@ -198,16 +198,14 @@ static int tda9840_remove(struct i2c_client *client) return 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static int tda9840_legacy_probe(struct i2c_adapter *adapter) { /* Let's see whether this is a known adapter we can attach to. Prevents conflicts with tvaudio.c. */ return adapter->id == I2C_HW_SAA7146; } -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else static const struct i2c_device_id tda9840_id[] = { { "tda9840", 0 }, { } @@ -219,10 +217,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "tda9840", .probe = tda9840_probe, .remove = tda9840_remove, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .legacy_probe = tda9840_legacy_probe, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else .id_table = tda9840_id, #endif }; |