aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-03-29 16:56:18 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:44:19 -0400
commit647da444951bc11c0d9c4680abf71e2520d8eae5 (patch)
tree9df33b067e6c9bfa125f280d5e31362b2152929a /drivers/media/video/tvaudio.c
parent75b4c260fa93d99979a8b5bec5a621daff469398 (diff)
V4L/DVB (11365): tvaudio: remove i2c legacy code
All drivers that use tvaudio now use v4l2_subdev, so we can remove the legacy code from tvaudio. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tvaudio.c')
-rw-r--r--drivers/media/video/tvaudio.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index 226bf3565ac9..994753cbd630 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -35,7 +35,7 @@
35#include <media/tvaudio.h> 35#include <media/tvaudio.h>
36#include <media/v4l2-device.h> 36#include <media/v4l2-device.h>
37#include <media/v4l2-chip-ident.h> 37#include <media/v4l2-chip-ident.h>
38#include <media/v4l2-i2c-drv-legacy.h> 38#include <media/v4l2-i2c-drv.h>
39 39
40#include <media/i2c-addr.h> 40#include <media/i2c-addr.h>
41 41
@@ -136,20 +136,6 @@ static inline struct CHIPSTATE *to_state(struct v4l2_subdev *sd)
136 return container_of(sd, struct CHIPSTATE, sd); 136 return container_of(sd, struct CHIPSTATE, sd);
137} 137}
138 138
139/* ---------------------------------------------------------------------- */
140/* i2c addresses */
141
142static unsigned short normal_i2c[] = {
143 I2C_ADDR_TDA8425 >> 1,
144 I2C_ADDR_TEA6300 >> 1,
145 I2C_ADDR_TEA6420 >> 1,
146 I2C_ADDR_TDA9840 >> 1,
147 I2C_ADDR_TDA985x_L >> 1,
148 I2C_ADDR_TDA985x_H >> 1,
149 I2C_ADDR_TDA9874 >> 1,
150 I2C_ADDR_PIC16C54 >> 1,
151 I2C_CLIENT_END };
152I2C_CLIENT_INSMOD;
153 139
154/* ---------------------------------------------------------------------- */ 140/* ---------------------------------------------------------------------- */
155/* i2c I/O functions */ 141/* i2c I/O functions */
@@ -1918,11 +1904,6 @@ static int tvaudio_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ide
1918 return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TVAUDIO, 0); 1904 return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TVAUDIO, 0);
1919} 1905}
1920 1906
1921static int tvaudio_command(struct i2c_client *client, unsigned cmd, void *arg)
1922{
1923 return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
1924}
1925
1926/* ----------------------------------------------------------------------- */ 1907/* ----------------------------------------------------------------------- */
1927 1908
1928static const struct v4l2_subdev_core_ops tvaudio_core_ops = { 1909static const struct v4l2_subdev_core_ops tvaudio_core_ops = {
@@ -2088,16 +2069,6 @@ static int tvaudio_remove(struct i2c_client *client)
2088 return 0; 2069 return 0;
2089} 2070}
2090 2071
2091static int tvaudio_legacy_probe(struct i2c_adapter *adap)
2092{
2093 /* don't attach on saa7146 based cards,
2094 because dedicated drivers are used */
2095 if ((adap->id == I2C_HW_SAA7146))
2096 return 0;
2097 if (adap->class & I2C_CLASS_TV_ANALOG)
2098 return 1;
2099 return 0;
2100}
2101 2072
2102/* This driver supports many devices and the idea is to let the driver 2073/* This driver supports many devices and the idea is to let the driver
2103 detect which device is present. So rather than listing all supported 2074 detect which device is present. So rather than listing all supported
@@ -2110,10 +2081,7 @@ MODULE_DEVICE_TABLE(i2c, tvaudio_id);
2110 2081
2111static struct v4l2_i2c_driver_data v4l2_i2c_data = { 2082static struct v4l2_i2c_driver_data v4l2_i2c_data = {
2112 .name = "tvaudio", 2083 .name = "tvaudio",
2113 .driverid = I2C_DRIVERID_TVAUDIO,
2114 .command = tvaudio_command,
2115 .probe = tvaudio_probe, 2084 .probe = tvaudio_probe,
2116 .remove = tvaudio_remove, 2085 .remove = tvaudio_remove,
2117 .legacy_probe = tvaudio_legacy_probe,
2118 .id_table = tvaudio_id, 2086 .id_table = tvaudio_id,
2119}; 2087};