V4L/DVB (11363): tvp5150: remove i2c legacy code.
[safe/jmp/linux-2.6] / drivers / media / video / tvp5150.c
index 2cd64ef..d7f3bad 100644 (file)
@@ -8,10 +8,9 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <linux/delay.h>
-#include <linux/video_decoder.h>
 #include <media/v4l2-device.h>
 #include <media/tvp5150.h>
-#include <media/v4l2-i2c-drv-legacy.h>
+#include <media/v4l2-i2c-drv.h>
 #include <media/v4l2-chip-ident.h>
 
 #include "tvp5150_reg.h"
@@ -20,14 +19,6 @@ MODULE_DESCRIPTION("Texas Instruments TVP5150A video decoder driver");
 MODULE_AUTHOR("Mauro Carvalho Chehab");
 MODULE_LICENSE("GPL");
 
-/* standard i2c insmod options */
-static unsigned short normal_i2c[] = {
-       0xb8 >> 1,
-       0xba >> 1,
-       I2C_CLIENT_END
-};
-
-I2C_CLIENT_INSMOD;
 
 static int debug;
 module_param(debug, int, 0);
@@ -632,7 +623,7 @@ static int tvp5150_g_sliced_vbi_cap(struct v4l2_subdev *sd,
        const struct i2c_vbi_ram_value *regs = vbi_ram_default;
        int line;
 
-       v4l2_dbg(1, debug, sd, "VIDIOC_G_SLICED_VBI_CAP\n");
+       v4l2_dbg(1, debug, sd, "g_sliced_vbi_cap\n");
        memset(cap, 0, sizeof *cap);
 
        while (regs->reg != (u16)-1 ) {
@@ -831,7 +822,7 @@ static int tvp5150_reset(struct v4l2_subdev *sd, u32 val)
 
 static int tvp5150_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
 {
-       v4l2_dbg(1, debug, sd, "VIDIOC_G_CTRL called\n");
+       v4l2_dbg(1, debug, sd, "g_ctrl called\n");
 
        switch (ctrl->id) {
        case V4L2_CID_BRIGHTNESS:
@@ -861,7 +852,7 @@ static int tvp5150_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
                if (ctrl->value < tvp5150_qctrl[i].minimum ||
                    ctrl->value > tvp5150_qctrl[i].maximum)
                        return -ERANGE;
-               v4l2_dbg(1, debug, sd, "VIDIOC_S_CTRL: id=%d, value=%d\n",
+               v4l2_dbg(1, debug, sd, "s_ctrl: id=%d, value=%d\n",
                                        ctrl->id, ctrl->value);
                break;
        }
@@ -1015,7 +1006,7 @@ static int tvp5150_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
 {
        int i;
 
-       v4l2_dbg(1, debug, sd, "VIDIOC_QUERYCTRL called\n");
+       v4l2_dbg(1, debug, sd, "queryctrl called\n");
 
        for (i = 0; i < ARRAY_SIZE(tvp5150_qctrl); i++)
                if (qc->id && qc->id == tvp5150_qctrl[i].id) {
@@ -1027,11 +1018,6 @@ static int tvp5150_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
        return -EINVAL;
 }
 
-static int tvp5150_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 tvp5150_core_ops = {
@@ -1126,10 +1112,7 @@ MODULE_DEVICE_TABLE(i2c, tvp5150_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "tvp5150",
-       .driverid = I2C_DRIVERID_TVP5150,
-       .command = tvp5150_command,
        .probe = tvp5150_probe,
        .remove = tvp5150_remove,
-       .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL,
        .id_table = tvp5150_id,
 };