diff options
-rw-r--r-- | linux/drivers/media/video/tvaudio.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index 39d796908..28caf6ef3 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -38,7 +38,7 @@ #include <media/tvaudio.h> #include <media/v4l2-device.h> #include <media/v4l2-chip-ident.h> -#include <media/v4l2-i2c-drv-legacy.h> +#include <media/v4l2-i2c-drv.h> #include <media/i2c-addr.h> @@ -139,6 +139,7 @@ static inline struct CHIPSTATE *to_state(struct v4l2_subdev *sd) return container_of(sd, struct CHIPSTATE, sd); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) /* ---------------------------------------------------------------------- */ /* i2c addresses */ @@ -153,6 +154,7 @@ static unsigned short normal_i2c[] = { I2C_ADDR_PIC16C54 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; +#endif /* ---------------------------------------------------------------------- */ /* i2c I/O functions */ @@ -1926,11 +1928,6 @@ static int tvaudio_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ide return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TVAUDIO, 0); } -static int tvaudio_command(struct i2c_client *client, unsigned cmd, void *arg) -{ - return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg); -} - /* ----------------------------------------------------------------------- */ static const struct v4l2_subdev_core_ops tvaudio_core_ops = { @@ -2100,6 +2097,7 @@ static int tvaudio_remove(struct i2c_client *client) return 0; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static int tvaudio_legacy_probe(struct i2c_adapter *adap) { /* don't attach on saa7146 based cards, @@ -2110,6 +2108,7 @@ static int tvaudio_legacy_probe(struct i2c_adapter *adap) return 1; return 0; } +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) /* This driver supports many devices and the idea is to let the driver @@ -2124,11 +2123,11 @@ MODULE_DEVICE_TABLE(i2c, tvaudio_id); static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "tvaudio", - .driverid = I2C_DRIVERID_TVAUDIO, - .command = tvaudio_command, .probe = tvaudio_probe, .remove = tvaudio_remove, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) .legacy_probe = tvaudio_legacy_probe, +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = tvaudio_id, #endif |