summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tea6415c.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/tea6415c.c')
-rw-r--r--linux/drivers/media/video/tea6415c.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c
index eaf29bd90..de866798b 100644
--- a/linux/drivers/media/video/tea6415c.c
+++ b/linux/drivers/media/video/tea6415c.c
@@ -46,19 +46,18 @@ module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Debug level (0-1)");
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
static unsigned short normal_i2c[] = { 0x03, 0x43, I2C_CLIENT_END };
I2C_CLIENT_INSMOD;
#endif
/* makes a connection between the input-pin 'i' and the output-pin 'o' */
-static int tea6415c_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int tea6415c_s_routing(struct v4l2_subdev *sd,
+ u32 i, u32 o, u32 config)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
u8 byte = 0;
- u32 i = route->input;
- u32 o = route->output;
int ret;
v4l2_dbg(1, debug, sd, "i=%d, o=%d\n", i, o);
@@ -176,16 +175,14 @@ static int tea6415c_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 tea6415c_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 tea6415c_id[] = {
{ "tea6415c", 0 },
{ }
@@ -197,10 +194,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.name = "tea6415c",
.probe = tea6415c_probe,
.remove = tea6415c_remove,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
.legacy_probe = tea6415c_legacy_probe,
-#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+#else
.id_table = tea6415c_id,
#endif
};