V4L/DVB (11380): v4l2-subdev: change s_routing prototype
[deliverable/linux.git] / drivers / media / video / saa7191.c
index 40ae2787326f0596be3fb29d5efea6651a5db7d3..a2513772196bf41279bed4c65a2af61114b8ecc7 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/i2c.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 "saa7191.h"
 
@@ -34,9 +34,6 @@ MODULE_VERSION(SAA7191_MODULE_VERSION);
 MODULE_AUTHOR("Mikael Nousiainen <tmnousia@cc.hut.fi>");
 MODULE_LICENSE("GPL");
 
-static unsigned short normal_i2c[] = { 0x8a >> 1, 0x8e >> 1, I2C_CLIENT_END };
-
-I2C_CLIENT_INSMOD;
 
 // #define SAA7191_DEBUG
 
@@ -163,14 +160,14 @@ static int saa7191_write_block(struct v4l2_subdev *sd,
 /* Helper functions */
 
 static int saa7191_s_routing(struct v4l2_subdev *sd,
-                               const struct v4l2_routing *route)
+                            u32 input, u32 output, u32 config)
 {
        struct saa7191 *decoder = to_saa7191(sd);
        u8 luma = saa7191_read_reg(sd, SAA7191_REG_LUMA);
        u8 iock = saa7191_read_reg(sd, SAA7191_REG_IOCK);
        int err;
 
-       switch (route->input) {
+       switch (input) {
        case SAA7191_INPUT_COMPOSITE: /* Set Composite input */
                iock &= ~(SAA7191_IOCK_CHRS | SAA7191_IOCK_GPSW1
                          | SAA7191_IOCK_GPSW2);
@@ -193,7 +190,7 @@ static int saa7191_s_routing(struct v4l2_subdev *sd,
        if (err)
                return -EIO;
 
-       decoder->input = route->input;
+       decoder->input = input;
 
        return 0;
 }
@@ -579,20 +576,12 @@ static int saa7191_g_chip_ident(struct v4l2_subdev *sd,
        return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_SAA7191, 0);
 }
 
-static int saa7191_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 saa7191_core_ops = {
        .g_chip_ident = saa7191_g_chip_ident,
        .g_ctrl = saa7191_g_ctrl,
        .s_ctrl = saa7191_s_ctrl,
-};
-
-static const struct v4l2_subdev_tuner_ops saa7191_tuner_ops = {
        .s_std = saa7191_s_std,
 };
 
@@ -652,11 +641,6 @@ static int saa7191_remove(struct i2c_client *client)
        return 0;
 }
 
-static int saa7191_legacy_probe(struct i2c_adapter *adapter)
-{
-       return adapter->id == I2C_HW_SGI_VINO;
-}
-
 static const struct i2c_device_id saa7191_id[] = {
        { "saa7191", 0 },
        { }
@@ -665,10 +649,7 @@ MODULE_DEVICE_TABLE(i2c, saa7191_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "saa7191",
-       .driverid = I2C_DRIVERID_SAA7191,
-       .command = saa7191_command,
        .probe = saa7191_probe,
        .remove = saa7191_remove,
-       .legacy_probe = saa7191_legacy_probe,
        .id_table = saa7191_id,
 };
This page took 0.026187 seconds and 5 git commands to generate.