Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask
[pandora-kernel.git] / drivers / media / video / adv7170.c
index 7b10487..873c30a 100644 (file)
 #include <linux/videodev2.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>
 
 MODULE_DESCRIPTION("Analog Devices ADV7170 video encoder driver");
 MODULE_AUTHOR("Maxim Yevtyushkin");
 MODULE_LICENSE("GPL");
 
-static unsigned short normal_i2c[] = {
-       0xd4 >> 1, 0xd6 >> 1,   /* adv7170 IDs */
-       0x54 >> 1, 0x56 >> 1,   /* adv7171 IDs */
-       I2C_CLIENT_END
-};
-
-I2C_CLIENT_INSMOD;
 
 static int debug;
 module_param(debug, int, 0);
@@ -202,7 +195,7 @@ static int adv7170_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
 {
        struct adv7170 *encoder = to_adv7170(sd);
 
-       v4l2_dbg(1, debug, sd, "set norm %llx\n", std);
+       v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std);
 
        if (std & V4L2_STD_NTSC) {
                adv7170_write_block(sd, init_NTSC, sizeof(init_NTSC));
@@ -217,10 +210,11 @@ static int adv7170_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
                adv7170_write(sd, 0x07, TR0MODE | TR0RST);
                adv7170_write(sd, 0x07, TR0MODE);
        } else {
-               v4l2_dbg(1, debug, sd, "illegal norm: %llx\n", std);
+               v4l2_dbg(1, debug, sd, "illegal norm: %llx\n",
+                               (unsigned long long)std);
                return -EINVAL;
        }
-       v4l2_dbg(1, debug, sd, "switched to %llx\n", std);
+       v4l2_dbg(1, debug, sd, "switched to %llx\n", (unsigned long long)std);
        encoder->norm = std;
        return 0;
 }
@@ -271,11 +265,6 @@ static int adv7170_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ide
        return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7170, 0);
 }
 
-static int adv7170_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 adv7170_core_ops = {
@@ -348,8 +337,6 @@ MODULE_DEVICE_TABLE(i2c, adv7170_id);
 
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "adv7170",
-       .driverid = I2C_DRIVERID_ADV7170,
-       .command = adv7170_command,
        .probe = adv7170_probe,
        .remove = adv7170_remove,
        .id_table = adv7170_id,