]> Pileus Git - ~andy/linux/commitdiff
[media] media/i2c: remove g_chip_ident op
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 29 May 2013 09:59:51 +0000 (06:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 17 Jun 2013 11:52:10 +0000 (08:52 -0300)
This is no longer needed since the core now handles this through DBG_G_CHIP_INFO.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
47 files changed:
drivers/media/i2c/ad9389b.c
drivers/media/i2c/adv7170.c
drivers/media/i2c/adv7175.c
drivers/media/i2c/adv7180.c
drivers/media/i2c/adv7183.c
drivers/media/i2c/adv7343.c
drivers/media/i2c/adv7393.c
drivers/media/i2c/adv7604.c
drivers/media/i2c/ak881x.c
drivers/media/i2c/bt819.c
drivers/media/i2c/bt856.c
drivers/media/i2c/bt866.c
drivers/media/i2c/cs5345.c
drivers/media/i2c/cs53l32a.c
drivers/media/i2c/cx25840/cx25840-core.c
drivers/media/i2c/ks0127.c
drivers/media/i2c/m52790.c
drivers/media/i2c/msp3400-driver.c
drivers/media/i2c/mt9m032.c
drivers/media/i2c/mt9p031.c
drivers/media/i2c/mt9v011.c
drivers/media/i2c/noon010pc30.c
drivers/media/i2c/ov7640.c
drivers/media/i2c/ov7670.c
drivers/media/i2c/saa6588.c
drivers/media/i2c/saa7110.c
drivers/media/i2c/saa7115.c
drivers/media/i2c/saa7127.c
drivers/media/i2c/saa717x.c
drivers/media/i2c/saa7185.c
drivers/media/i2c/saa7191.c
drivers/media/i2c/tda9840.c
drivers/media/i2c/tea6415c.c
drivers/media/i2c/tea6420.c
drivers/media/i2c/ths7303.c
drivers/media/i2c/tvaudio.c
drivers/media/i2c/tvp514x.c
drivers/media/i2c/tvp5150.c
drivers/media/i2c/tvp7002.c
drivers/media/i2c/tw2804.c
drivers/media/i2c/upd64031a.c
drivers/media/i2c/upd64083.c
drivers/media/i2c/vp27smpx.c
drivers/media/i2c/vpx3220.c
drivers/media/i2c/vs6624.c
drivers/media/i2c/wm8739.c
drivers/media/i2c/wm8775.c

index ade1fec7e0400b9de6f4d93e26dcbd6372ceeb6f..ba4364dfae6687a8ec60325b698a06e97fc87513 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/workqueue.h>
 #include <linux/v4l2-dv-timings.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ctrls.h>
 #include <media/ad9389b.h>
@@ -343,10 +342,6 @@ static const struct v4l2_ctrl_ops ad9389b_ctrl_ops = {
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int ad9389b_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->val = ad9389b_rd(sd, reg->reg & 0xff);
        reg->size = 1;
        return 0;
@@ -354,22 +349,11 @@ static int ad9389b_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
 
 static int ad9389b_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        ad9389b_wr(sd, reg->reg & 0xff, reg->val & 0xff);
        return 0;
 }
 #endif
 
-static int ad9389b_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_AD9389B, 0);
-}
-
 static int ad9389b_log_status(struct v4l2_subdev *sd)
 {
        struct ad9389b_state *state = get_ad9389b_state(sd);
@@ -596,7 +580,6 @@ static int ad9389b_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
 
 static const struct v4l2_subdev_core_ops ad9389b_core_ops = {
        .log_status = ad9389b_log_status,
-       .g_chip_ident = ad9389b_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = ad9389b_g_register,
        .s_register = ad9389b_s_register,
@@ -1303,8 +1286,8 @@ static int ad9389b_remove(struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_device_id ad9389b_id[] = {
-       { "ad9389b", V4L2_IDENT_AD9389B },
-       { "ad9889b", V4L2_IDENT_AD9389B },
+       { "ad9389b", 0 },
+       { "ad9889b", 0 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ad9389b_id);
index d07689d44354232be7ba18523ba728ed7a559451..04bb29720aaf1c7bae4410cbb8f0b608394d0231 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 
 MODULE_DESCRIPTION("Analog Devices ADV7170 video encoder driver");
 MODULE_AUTHOR("Maxim Yevtyushkin");
@@ -317,19 +316,8 @@ static int adv7170_s_fmt(struct v4l2_subdev *sd,
        return ret;
 }
 
-static int adv7170_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7170, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
-static const struct v4l2_subdev_core_ops adv7170_core_ops = {
-       .g_chip_ident = adv7170_g_chip_ident,
-};
-
 static const struct v4l2_subdev_video_ops adv7170_video_ops = {
        .s_std_output = adv7170_s_std_output,
        .s_routing = adv7170_s_routing,
@@ -339,7 +327,6 @@ static const struct v4l2_subdev_video_ops adv7170_video_ops = {
 };
 
 static const struct v4l2_subdev_ops adv7170_ops = {
-       .core = &adv7170_core_ops,
        .video = &adv7170_video_ops,
 };
 
index eaefa50b8d2896c0f9fedd2d30c6a3a62597d9f7..b88f3b3d5ed947c4e406d5c2a4792bf3af2797d9 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 
 MODULE_DESCRIPTION("Analog Devices ADV7175 video encoder driver");
 MODULE_AUTHOR("Dave Perks");
@@ -355,13 +354,6 @@ static int adv7175_s_fmt(struct v4l2_subdev *sd,
        return ret;
 }
 
-static int adv7175_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7175, 0);
-}
-
 static int adv7175_s_power(struct v4l2_subdev *sd, int on)
 {
        if (on)
@@ -375,7 +367,6 @@ static int adv7175_s_power(struct v4l2_subdev *sd, int on)
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops adv7175_core_ops = {
-       .g_chip_ident = adv7175_g_chip_ident,
        .init = adv7175_init,
        .s_power = adv7175_s_power,
 };
index 11f13a83a64b1a319243f9c2364dfde488c8edde..d7d99f1c69e4f9459d0515a9eb8769dd182900c3 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ctrls.h>
-#include <media/v4l2-chip-ident.h>
 #include <linux/mutex.h>
 
 #define ADV7180_INPUT_CONTROL_REG                      0x00
@@ -274,14 +273,6 @@ static int adv7180_g_input_status(struct v4l2_subdev *sd, u32 *status)
        return ret;
 }
 
-static int adv7180_g_chip_ident(struct v4l2_subdev *sd,
-                               struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7180, 0);
-}
-
 static int adv7180_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
 {
        struct adv7180_state *state = to_state(sd);
@@ -450,7 +441,6 @@ static const struct v4l2_subdev_video_ops adv7180_video_ops = {
 };
 
 static const struct v4l2_subdev_core_ops adv7180_core_ops = {
-       .g_chip_ident = adv7180_g_chip_ident,
        .s_std = adv7180_s_std,
 };
 
index 7c48e22b41a239440aff332e903289c6fb796f5d..980815d37bb104b545449081af667d7b0e0f695b 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/videodev2.h>
 
 #include <media/adv7183.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 
@@ -481,25 +480,9 @@ static int adv7183_s_stream(struct v4l2_subdev *sd, int enable)
        return 0;
 }
 
-static int adv7183_g_chip_ident(struct v4l2_subdev *sd,
-               struct v4l2_dbg_chip_ident *chip)
-{
-       int rev;
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       /* 0x11 for adv7183, 0x13 for adv7183b */
-       rev = adv7183_read(sd, ADV7183_IDENT);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7183, rev);
-}
-
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int adv7183_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->val = adv7183_read(sd, reg->reg & 0xff);
        reg->size = 1;
        return 0;
@@ -507,10 +490,6 @@ static int adv7183_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
 
 static int adv7183_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        adv7183_write(sd, reg->reg & 0xff, reg->val & 0xff);
        return 0;
 }
@@ -525,7 +504,6 @@ static const struct v4l2_subdev_core_ops adv7183_core_ops = {
        .g_std = adv7183_g_std,
        .s_std = adv7183_s_std,
        .reset = adv7183_reset,
-       .g_chip_ident = adv7183_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = adv7183_g_register,
        .s_register = adv7183_s_register,
index 9fc2b985df0e191e4a0b7f908180b1e5d6ca6c5b..7606218ec4a760bb14bd5fcfbe0813e480f89466 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <media/adv7343.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 
 #include "adv7343_regs.h"
@@ -311,21 +310,12 @@ static int adv7343_s_ctrl(struct v4l2_ctrl *ctrl)
        return -EINVAL;
 }
 
-static int adv7343_g_chip_ident(struct v4l2_subdev *sd,
-                               struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7343, 0);
-}
-
 static const struct v4l2_ctrl_ops adv7343_ctrl_ops = {
        .s_ctrl = adv7343_s_ctrl,
 };
 
 static const struct v4l2_subdev_core_ops adv7343_core_ops = {
        .log_status = adv7343_log_status,
-       .g_chip_ident = adv7343_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
index ec505098598ac122f40eea2b64ecb0e4fa7238a5..558f19154eb9cbe17365ec05c862b540fa4627e1 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <media/adv7393.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 
 #include "adv7393_regs.h"
@@ -301,21 +300,12 @@ static int adv7393_s_ctrl(struct v4l2_ctrl *ctrl)
        return -EINVAL;
 }
 
-static int adv7393_g_chip_ident(struct v4l2_subdev *sd,
-                               struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7393, 0);
-}
-
 static const struct v4l2_ctrl_ops adv7393_ctrl_ops = {
        .s_ctrl = adv7393_s_ctrl,
 };
 
 static const struct v4l2_subdev_core_ops adv7393_core_ops = {
        .log_status = adv7393_log_status,
-       .g_chip_ident = adv7393_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
index 5528cd15cc676fd2176f96d535254e052b67569e..1d675b58fd71bae6db5f5c80fd971745b0525fb6 100644 (file)
@@ -38,7 +38,6 @@
 #include <linux/v4l2-dv-timings.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ctrls.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/adv7604.h>
 
 static int debug;
@@ -643,10 +642,6 @@ static void adv7604_inv_register(struct v4l2_subdev *sd)
 static int adv7604_g_register(struct v4l2_subdev *sd,
                                        struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->size = 1;
        switch (reg->reg >> 8) {
        case 0:
@@ -699,10 +694,6 @@ static int adv7604_g_register(struct v4l2_subdev *sd,
 static int adv7604_s_register(struct v4l2_subdev *sd,
                                        const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        switch (reg->reg >> 8) {
        case 0:
                io_write(sd, reg->reg & 0xff, reg->val & 0xff);
@@ -980,14 +971,6 @@ static int adv7604_s_ctrl(struct v4l2_ctrl *ctrl)
        return -EINVAL;
 }
 
-static int adv7604_g_chip_ident(struct v4l2_subdev *sd,
-                                       struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7604, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static inline bool no_power(struct v4l2_subdev *sd)
@@ -1783,7 +1766,6 @@ static const struct v4l2_subdev_core_ops adv7604_core_ops = {
        .s_ctrl = v4l2_subdev_s_ctrl,
        .queryctrl = v4l2_subdev_queryctrl,
        .querymenu = v4l2_subdev_querymenu,
-       .g_chip_ident = adv7604_g_chip_ident,
        .interrupt_service_routine = adv7604_isr,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = adv7604_g_register,
index b918c3f29cbee4b97e08a98166e32aa788a593f4..fcd8a3f626fa64961b447bd918c371a7e2fcc122 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/module.h>
 
 #include <media/ak881x.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-device.h>
 
@@ -33,7 +32,6 @@ struct ak881x {
        struct v4l2_subdev subdev;
        struct ak881x_pdata *pdata;
        unsigned int lines;
-       int id; /* DEVICE_ID code V4L2_IDENT_AK881X code from v4l2-chip-ident.h */
        char revision;  /* DEVICE_REVISION content */
 };
 
@@ -62,36 +60,15 @@ static struct ak881x *to_ak881x(const struct i2c_client *client)
        return container_of(i2c_get_clientdata(client), struct ak881x, subdev);
 }
 
-static int ak881x_g_chip_ident(struct v4l2_subdev *sd,
-                              struct v4l2_dbg_chip_ident *id)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-       struct ak881x *ak881x = to_ak881x(client);
-
-       if (id->match.type != V4L2_CHIP_MATCH_I2C_ADDR)
-               return -EINVAL;
-
-       if (id->match.addr != client->addr)
-               return -ENODEV;
-
-       id->ident       = ak881x->id;
-       id->revision    = ak881x->revision;
-
-       return 0;
-}
-
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int ak881x_g_register(struct v4l2_subdev *sd,
                             struct v4l2_dbg_register *reg)
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
 
-       if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0x26)
+       if (reg->reg > 0x26)
                return -EINVAL;
 
-       if (reg->match.addr != client->addr)
-               return -ENODEV;
-
        reg->val = reg_read(client, reg->reg);
 
        if (reg->val > 0xffff)
@@ -105,12 +82,9 @@ static int ak881x_s_register(struct v4l2_subdev *sd,
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
 
-       if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0x26)
+       if (reg->reg > 0x26)
                return -EINVAL;
 
-       if (reg->match.addr != client->addr)
-               return -ENODEV;
-
        if (reg_write(client, reg->reg, reg->val) < 0)
                return -EIO;
 
@@ -229,7 +203,6 @@ static int ak881x_s_stream(struct v4l2_subdev *sd, int enable)
 }
 
 static struct v4l2_subdev_core_ops ak881x_subdev_core_ops = {
-       .g_chip_ident   = ak881x_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register     = ak881x_g_register,
        .s_register     = ak881x_s_register,
@@ -274,10 +247,7 @@ static int ak881x_probe(struct i2c_client *client,
 
        switch (data) {
        case 0x13:
-               ak881x->id = V4L2_IDENT_AK8813;
-               break;
        case 0x14:
-               ak881x->id = V4L2_IDENT_AK8814;
                break;
        default:
                dev_err(&client->dev,
index ee9ed67e7910b47ee02c8a6f32c274ae13cee4d6..ae1eac01bbc7f7c12445d3f31170df5d962286cf 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/videodev2.h>
 #include <linux/slab.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 #include <media/bt819.h>
 
@@ -57,7 +56,6 @@ struct bt819 {
        unsigned char reg[32];
 
        v4l2_std_id norm;
-       int ident;
        int input;
        int enable;
 };
@@ -373,14 +371,6 @@ static int bt819_s_ctrl(struct v4l2_ctrl *ctrl)
        return 0;
 }
 
-static int bt819_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct bt819 *decoder = to_bt819(sd);
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, decoder->ident, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_ctrl_ops bt819_ctrl_ops = {
@@ -388,7 +378,6 @@ static const struct v4l2_ctrl_ops bt819_ctrl_ops = {
 };
 
 static const struct v4l2_subdev_core_ops bt819_core_ops = {
-       .g_chip_ident = bt819_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
@@ -435,15 +424,12 @@ static int bt819_probe(struct i2c_client *client,
        switch (ver & 0xf0) {
        case 0x70:
                name = "bt819a";
-               decoder->ident = V4L2_IDENT_BT819A;
                break;
        case 0x60:
                name = "bt817a";
-               decoder->ident = V4L2_IDENT_BT817A;
                break;
        case 0x20:
                name = "bt815a";
-               decoder->ident = V4L2_IDENT_BT815A;
                break;
        default:
                v4l2_dbg(1, debug, sd,
index 7e5011163b62e59e6f2fd60d31058efd7f37441e..7fc163d0253cb46592ed24b2409a5847524fe8e0 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 
 MODULE_DESCRIPTION("Brooktree-856A video encoder driver");
 MODULE_AUTHOR("Mike Bernson & Dave Perks");
@@ -177,17 +176,9 @@ static int bt856_s_routing(struct v4l2_subdev *sd,
        return 0;
 }
 
-static int bt856_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_BT856, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops bt856_core_ops = {
-       .g_chip_ident = bt856_g_chip_ident,
        .init = bt856_init,
 };
 
index 9355b924b471d00c61175d135e63cf6baadc78c2..a8bf10fc665daf071b9dc0842767b5dad4fd9fab 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 
 MODULE_DESCRIPTION("Brooktree-866 video encoder driver");
 MODULE_AUTHOR("Mike Bernson & Dave Perks");
@@ -175,26 +174,14 @@ static int bt866_s_routing(struct v4l2_subdev *sd,
        bt866_write(client, 0xdc, val);
 #endif
 
-static int bt866_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_BT866, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
-static const struct v4l2_subdev_core_ops bt866_core_ops = {
-       .g_chip_ident = bt866_g_chip_ident,
-};
-
 static const struct v4l2_subdev_video_ops bt866_video_ops = {
        .s_std_output = bt866_s_std_output,
        .s_routing = bt866_s_routing,
 };
 
 static const struct v4l2_subdev_ops bt866_ops = {
-       .core = &bt866_core_ops,
        .video = &bt866_video_ops,
 };
 
index 2661757c3a8ce6b516b8c8e8d56331f164edcb78..34b76a9e7515be4bb99789427c1644d03fc313e1 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/videodev2.h>
 #include <linux/slab.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 
 MODULE_DESCRIPTION("i2c device driver for cs5345 Audio ADC");
@@ -99,10 +98,6 @@ static int cs5345_s_ctrl(struct v4l2_ctrl *ctrl)
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int cs5345_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->size = 1;
        reg->val = cs5345_read(sd, reg->reg & 0x1f);
        return 0;
@@ -110,22 +105,11 @@ static int cs5345_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r
 
 static int cs5345_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        cs5345_write(sd, reg->reg & 0x1f, reg->val & 0xff);
        return 0;
 }
 #endif
 
-static int cs5345_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_CS5345, 0);
-}
-
 static int cs5345_log_status(struct v4l2_subdev *sd)
 {
        u8 v = cs5345_read(sd, 0x09) & 7;
@@ -148,7 +132,6 @@ static const struct v4l2_ctrl_ops cs5345_ctrl_ops = {
 
 static const struct v4l2_subdev_core_ops cs5345_core_ops = {
        .log_status = cs5345_log_status,
-       .g_chip_ident = cs5345_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
index 1082fb775ab230ff843589cd42de21fc97d7c36d..27400c16ef9aa635332c0b8e007b9c40b4aabf79 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 
 MODULE_DESCRIPTION("i2c device driver for cs53l32a Audio ADC");
@@ -104,14 +103,6 @@ static int cs53l32a_s_ctrl(struct v4l2_ctrl *ctrl)
        return -EINVAL;
 }
 
-static int cs53l32a_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client,
-                       chip, V4L2_IDENT_CS53l32A, 0);
-}
-
 static int cs53l32a_log_status(struct v4l2_subdev *sd)
 {
        struct cs53l32a_state *state = to_state(sd);
@@ -130,7 +121,6 @@ static const struct v4l2_ctrl_ops cs53l32a_ctrl_ops = {
 
 static const struct v4l2_subdev_core_ops cs53l32a_core_ops = {
        .log_status = cs53l32a_log_status,
-       .g_chip_ident = cs53l32a_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
index b81e32f371ae6263e46f9a0507723409c7303579..6fbdad4fe054e64169a7e73f088addc1c8277ea7 100644 (file)
@@ -45,7 +45,6 @@
 #include <linux/delay.h>
 #include <linux/math64.h>
 #include <media/v4l2-common.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/cx25840.h>
 
 #include "cx25840-core.h"
@@ -1662,8 +1661,6 @@ static int cx25840_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
 
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->size = 1;
        reg->val = cx25840_read(client, reg->reg & 0x0fff);
        return 0;
@@ -1673,8 +1670,6 @@ static int cx25840_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_regi
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
 
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        cx25840_write(client, reg->reg & 0x0fff, reg->val & 0xff);
        return 0;
 }
@@ -1934,14 +1929,6 @@ static int cx25840_reset(struct v4l2_subdev *sd, u32 val)
        return 0;
 }
 
-static int cx25840_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct cx25840_state *state = to_state(sd);
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, state->id, state->rev);
-}
-
 static int cx25840_log_status(struct v4l2_subdev *sd)
 {
        struct cx25840_state *state = to_state(sd);
@@ -5047,7 +5034,6 @@ static const struct v4l2_ctrl_ops cx25840_ctrl_ops = {
 
 static const struct v4l2_subdev_core_ops cx25840_core_ops = {
        .log_status = cx25840_log_status,
-       .g_chip_ident = cx25840_g_chip_ident,
        .g_ctrl = v4l2_subdev_g_ctrl,
        .s_ctrl = v4l2_subdev_s_ctrl,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
index c7227763240ecf91df67ddc567c58bdbe06793c6..b5223e850a26fb5437755138c1474fa158dc31eb 100644 (file)
@@ -42,7 +42,6 @@
 #include <linux/videodev2.h>
 #include <linux/slab.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include "ks0127.h"
 
 MODULE_DESCRIPTION("KS0127 video decoder driver");
@@ -200,7 +199,6 @@ struct adjust {
 struct ks0127 {
        struct v4l2_subdev sd;
        v4l2_std_id     norm;
-       int             ident;
        u8              regs[256];
 };
 
@@ -371,12 +369,9 @@ static void ks0127_and_or(struct v4l2_subdev *sd, u8 reg, u8 and_v, u8 or_v)
 ****************************************************************************/
 static void ks0127_init(struct v4l2_subdev *sd)
 {
-       struct ks0127 *ks = to_ks0127(sd);
        u8 *table = reg_defaults;
        int i;
 
-       ks->ident = V4L2_IDENT_KS0127;
-
        v4l2_dbg(1, debug, sd, "reset\n");
        msleep(1);
 
@@ -397,7 +392,6 @@ static void ks0127_init(struct v4l2_subdev *sd)
 
 
        if ((ks0127_read(sd, KS_STAT) & 0x80) == 0) {
-               ks->ident = V4L2_IDENT_KS0122S;
                v4l2_dbg(1, debug, sd, "ks0122s found\n");
                return;
        }
@@ -408,7 +402,6 @@ static void ks0127_init(struct v4l2_subdev *sd)
                break;
 
        case 9:
-               ks->ident = V4L2_IDENT_KS0127B;
                v4l2_dbg(1, debug, sd, "ks0127B Revision A found\n");
                break;
 
@@ -646,18 +639,9 @@ static int ks0127_g_input_status(struct v4l2_subdev *sd, u32 *status)
        return ks0127_status(sd, status, NULL);
 }
 
-static int ks0127_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-       struct ks0127 *ks = to_ks0127(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, ks->ident, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops ks0127_core_ops = {
-       .g_chip_ident = ks0127_g_chip_ident,
        .s_std = ks0127_s_std,
 };
 
index 3eeb546be6d93d18ceb2c20c3151655a29045212..bf476358704da8fc1f8cecc626fd285c62227a64 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/videodev2.h>
 #include <media/m52790.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 
 MODULE_DESCRIPTION("i2c device driver for m52790 A/V switch");
 MODULE_AUTHOR("Hans Verkuil");
@@ -83,10 +82,7 @@ static int m52790_s_routing(struct v4l2_subdev *sd,
 static int m52790_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
        struct m52790_state *state = to_state(sd);
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
 
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        if (reg->reg != 0)
                return -EINVAL;
        reg->size = 1;
@@ -97,10 +93,7 @@ static int m52790_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r
 static int m52790_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
        struct m52790_state *state = to_state(sd);
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
 
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        if (reg->reg != 0)
                return -EINVAL;
        state->input = reg->val & 0x0303;
@@ -110,13 +103,6 @@ static int m52790_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_regis
 }
 #endif
 
-static int m52790_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_M52790, 0);
-}
-
 static int m52790_log_status(struct v4l2_subdev *sd)
 {
        struct m52790_state *state = to_state(sd);
@@ -132,7 +118,6 @@ static int m52790_log_status(struct v4l2_subdev *sd)
 
 static const struct v4l2_subdev_core_ops m52790_core_ops = {
        .log_status = m52790_log_status,
-       .g_chip_ident = m52790_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = m52790_g_register,
        .s_register = m52790_s_register,
index ae92c20790e30718f71d1878e15b55cab2d78992..8190fec6808075049ca2e1f94d47ba3613f40602 100644 (file)
@@ -570,15 +570,6 @@ static int msp_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq)
        return 0;
 }
 
-static int msp_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct msp_state *state = to_state(sd);
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, state->ident,
-                       (state->rev1 << 16) | state->rev2);
-}
-
 static int msp_log_status(struct v4l2_subdev *sd)
 {
        struct msp_state *state = to_state(sd);
@@ -651,7 +642,6 @@ static const struct v4l2_ctrl_ops msp_ctrl_ops = {
 
 static const struct v4l2_subdev_core_ops msp_core_ops = {
        .log_status = msp_log_status,
-       .g_chip_ident = msp_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
index cca704e02f79a37e0d6d5ff6560b51ac2b4f15db..846b15f0bf6458d778ec731442e0e45107db179c 100644 (file)
@@ -554,10 +554,8 @@ static int mt9m032_g_register(struct v4l2_subdev *sd,
        struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev);
        int val;
 
-       if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
+       if (reg->reg > 0xff)
                return -EINVAL;
-       if (reg->match.addr != client->addr)
-               return -ENODEV;
 
        val = mt9m032_read(client, reg->reg);
        if (val < 0)
@@ -575,12 +573,9 @@ static int mt9m032_s_register(struct v4l2_subdev *sd,
        struct mt9m032 *sensor = to_mt9m032(sd);
        struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev);
 
-       if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
+       if (reg->reg > 0xff)
                return -EINVAL;
 
-       if (reg->match.addr != client->addr)
-               return -ENODEV;
-
        return mt9m032_write(client, reg->reg, reg->val);
 }
 #endif
index bf49899945f8f3f007d6855f32166be63ad8608d..fe3414866a63833d894a19c77b519d80031d79e3 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/videodev2.h>
 
 #include <media/mt9p031.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-subdev.h>
index 141919bf77fc1b74e4b188a4ec451330f0684e25..f74698cf14c94d343e8ae1861bc7d730ff139b60 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/module.h>
 #include <asm/div64.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 #include <media/mt9v011.h>
 
@@ -407,11 +406,6 @@ static int mt9v011_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt
 static int mt9v011_g_register(struct v4l2_subdev *sd,
                              struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
-
        reg->val = mt9v011_read(sd, reg->reg & 0xff);
        reg->size = 2;
 
@@ -421,29 +415,12 @@ static int mt9v011_g_register(struct v4l2_subdev *sd,
 static int mt9v011_s_register(struct v4l2_subdev *sd,
                              const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
-
        mt9v011_write(sd, reg->reg & 0xff, reg->val & 0xffff);
 
        return 0;
 }
 #endif
 
-static int mt9v011_g_chip_ident(struct v4l2_subdev *sd,
-                               struct v4l2_dbg_chip_ident *chip)
-{
-       u16 version;
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_MT9V011,
-                                         version);
-}
-
 static int mt9v011_s_ctrl(struct v4l2_ctrl *ctrl)
 {
        struct mt9v011 *core =
@@ -485,7 +462,6 @@ static struct v4l2_ctrl_ops mt9v011_ctrl_ops = {
 
 static const struct v4l2_subdev_core_ops mt9v011_core_ops = {
        .reset = mt9v011_reset,
-       .g_chip_ident = mt9v011_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = mt9v011_g_register,
        .s_register = mt9v011_s_register,
index 2284b02102dbf271b1d8d8e8a5c1e6548ce62e10..271d0b7967a6f3f7b875a2187352de690634a5ac 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/slab.h>
 #include <linux/regulator/consumer.h>
 #include <media/noon010pc30.h>
-#include <media/v4l2-chip-ident.h>
 #include <linux/videodev2.h>
 #include <linux/module.h>
 #include <media/v4l2-ctrls.h>
index 5e117abaa2ebbb4570069d3ea649782784c16070..faa64baf09e8b03297877dbbf73d4109ef6f5b4b 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <linux/slab.h>
 
 MODULE_DESCRIPTION("OmniVision ov7640 sensor driver");
index b030279810d33d77409969a959cd910545c9103b..e8a1ce204036f45cca1d1d495f29c8c7b72942d5 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/delay.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-mediabus.h>
 #include <media/ov7670.h>
@@ -1462,23 +1461,12 @@ static const struct v4l2_ctrl_ops ov7670_ctrl_ops = {
        .g_volatile_ctrl = ov7670_g_volatile_ctrl,
 };
 
-static int ov7670_g_chip_ident(struct v4l2_subdev *sd,
-               struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_OV7670, 0);
-}
-
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int ov7670_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
        unsigned char val = 0;
        int ret;
 
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        ret = ov7670_read(sd, reg->reg & 0xff, &val);
        reg->val = val;
        reg->size = 1;
@@ -1487,10 +1475,6 @@ static int ov7670_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r
 
 static int ov7670_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        ov7670_write(sd, reg->reg & 0xff, reg->val & 0xff);
        return 0;
 }
@@ -1499,7 +1483,6 @@ static int ov7670_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_regis
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops ov7670_core_ops = {
-       .g_chip_ident = ov7670_g_chip_ident,
        .reset = ov7670_reset,
        .init = ov7670_init,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
index 729e78d94222661aec6608219f2e19889ed253f0..70bc72e795d04b30814e32eb599f3b42f1de4328 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <media/saa6588.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 
 
 /* insmod options */
@@ -443,17 +442,9 @@ static int saa6588_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
        return 0;
 }
 
-static int saa6588_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_SAA6588, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops saa6588_core_ops = {
-       .g_chip_ident = saa6588_g_chip_ident,
        .ioctl = saa6588_ioctl,
 };
 
index e4026aa93f42c5e2c1eaf7bb3f5f52d5625be433..532105de96f03a7cd3e990cdbeff9a7f745500a2 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 
 MODULE_DESCRIPTION("Philips SAA7110 video decoder driver");
@@ -352,13 +351,6 @@ static int saa7110_s_ctrl(struct v4l2_ctrl *ctrl)
        return 0;
 }
 
-static int saa7110_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_SAA7110, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_ctrl_ops saa7110_ctrl_ops = {
@@ -366,7 +358,6 @@ static const struct v4l2_ctrl_ops saa7110_ctrl_ops = {
 };
 
 static const struct v4l2_subdev_core_ops saa7110_core_ops = {
-       .g_chip_ident = saa7110_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
index 4daa81c55a82e430b89a4f5d23e9ac31052e8325..90c43f3fb0f1a9d6bffaa4d288c90617cb4a7b38 100644 (file)
@@ -46,7 +46,6 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ctrls.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/saa7115.h>
 #include <asm/div64.h>
 
@@ -63,6 +62,16 @@ module_param(debug, bool, 0644);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 
+enum saa711x_model {
+       SAA7111A,
+       SAA7111,
+       SAA7113,
+       GM7113C,
+       SAA7114,
+       SAA7115,
+       SAA7118,
+};
+
 struct saa711x_state {
        struct v4l2_subdev sd;
        struct v4l2_ctrl_handler hdl;
@@ -80,7 +89,7 @@ struct saa711x_state {
        int radio;
        int width;
        int height;
-       u32 ident;
+       enum saa711x_model ident;
        u32 audclk_freq;
        u32 crystal_freq;
        bool ucgc;
@@ -111,10 +120,10 @@ static inline int saa711x_write(struct v4l2_subdev *sd, u8 reg, u8 value)
 /* Sanity routine to check if a register is present */
 static int saa711x_has_reg(const int id, const u8 reg)
 {
-       if (id == V4L2_IDENT_SAA7111)
+       if (id == SAA7111)
                return reg < 0x20 && reg != 0x01 && reg != 0x0f &&
                       (reg < 0x13 || reg > 0x19) && reg != 0x1d && reg != 0x1e;
-       if (id == V4L2_IDENT_SAA7111A)
+       if (id == SAA7111A)
                return reg < 0x20 && reg != 0x01 && reg != 0x0f &&
                       reg != 0x14 && reg != 0x18 && reg != 0x19 &&
                       reg != 0x1d && reg != 0x1e;
@@ -127,18 +136,18 @@ static int saa711x_has_reg(const int id, const u8 reg)
                return 0;
 
        switch (id) {
-       case V4L2_IDENT_GM7113C:
+       case GM7113C:
                return reg != 0x14 && (reg < 0x18 || reg > 0x1e) && reg < 0x20;
-       case V4L2_IDENT_SAA7113:
+       case SAA7113:
                return reg != 0x14 && (reg < 0x18 || reg > 0x1e) && (reg < 0x20 || reg > 0x3f) &&
                       reg != 0x5d && reg < 0x63;
-       case V4L2_IDENT_SAA7114:
+       case SAA7114:
                return (reg < 0x1a || reg > 0x1e) && (reg < 0x20 || reg > 0x2f) &&
                       (reg < 0x63 || reg > 0x7f) && reg != 0x33 && reg != 0x37 &&
                       reg != 0x81 && reg < 0xf0;
-       case V4L2_IDENT_SAA7115:
+       case SAA7115:
                return (reg < 0x20 || reg > 0x2f) && reg != 0x65 && (reg < 0xfc || reg > 0xfe);
-       case V4L2_IDENT_SAA7118:
+       case SAA7118:
                return (reg < 0x1a || reg > 0x1d) && (reg < 0x20 || reg > 0x22) &&
                       (reg < 0x26 || reg > 0x28) && reg != 0x33 && reg != 0x37 &&
                       (reg < 0x63 || reg > 0x7f) && reg != 0x81 && reg < 0xf0;
@@ -955,14 +964,14 @@ static void saa711x_set_v4lstd(struct v4l2_subdev *sd, v4l2_std_id std)
        // This works for NTSC-M, SECAM-L and the 50Hz PAL variants.
        if (std & V4L2_STD_525_60) {
                v4l2_dbg(1, debug, sd, "decoder set standard 60 Hz\n");
-               if (state->ident == V4L2_IDENT_GM7113C)
+               if (state->ident == GM7113C)
                        saa711x_writeregs(sd, gm7113c_cfg_60hz_video);
                else
                        saa711x_writeregs(sd, saa7115_cfg_60hz_video);
                saa711x_set_size(sd, 720, 480);
        } else {
                v4l2_dbg(1, debug, sd, "decoder set standard 50 Hz\n");
-               if (state->ident == V4L2_IDENT_GM7113C)
+               if (state->ident == GM7113C)
                        saa711x_writeregs(sd, gm7113c_cfg_50hz_video);
                else
                        saa711x_writeregs(sd, saa7115_cfg_50hz_video);
@@ -978,8 +987,8 @@ static void saa711x_set_v4lstd(struct v4l2_subdev *sd, v4l2_std_id std)
        011 NTSC N (3.58MHz)            PAL M (3.58MHz)
        100 reserved                    NTSC-Japan (3.58MHz)
        */
-       if (state->ident <= V4L2_IDENT_SAA7113 ||
-           state->ident == V4L2_IDENT_GM7113C) {
+       if (state->ident <= SAA7113 ||
+           state->ident == GM7113C) {
                u8 reg = saa711x_read(sd, R_0E_CHROMA_CNTL_1) & 0x8f;
 
                if (std == V4L2_STD_PAL_M) {
@@ -998,9 +1007,8 @@ static void saa711x_set_v4lstd(struct v4l2_subdev *sd, v4l2_std_id std)
                /* restart task B if needed */
                int taskb = saa711x_read(sd, R_80_GLOBAL_CNTL_1) & 0x10;
 
-               if (taskb && state->ident == V4L2_IDENT_SAA7114) {
+               if (taskb && state->ident == SAA7114)
                        saa711x_writeregs(sd, saa7115_cfg_vbi_on);
-               }
 
                /* switch audio mode too! */
                saa711x_s_clock_freq(sd, state->audclk_freq);
@@ -1022,7 +1030,7 @@ static void saa711x_set_lcr(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_forma
 
 #else
        /* SAA7113 and SAA7118 also should support VBI - Need testing */
-       if (state->ident != V4L2_IDENT_SAA7115)
+       if (state->ident != SAA7115)
                return;
 #endif
 
@@ -1244,14 +1252,14 @@ static int saa711x_s_routing(struct v4l2_subdev *sd,
                             u32 input, u32 output, u32 config)
 {
        struct saa711x_state *state = to_state(sd);
-       u8 mask = (state->ident <= V4L2_IDENT_SAA7111A) ? 0xf8 : 0xf0;
+       u8 mask = (state->ident <= SAA7111A) ? 0xf8 : 0xf0;
 
        v4l2_dbg(1, debug, sd, "decoder set input %d output %d\n",
                input, output);
 
        /* saa7111/3 does not have these inputs */
-       if ((state->ident <= V4L2_IDENT_SAA7113 ||
-            state->ident == V4L2_IDENT_GM7113C) &&
+       if ((state->ident <= SAA7113 ||
+            state->ident == GM7113C) &&
            (input == SAA7115_COMPOSITE4 ||
             input == SAA7115_COMPOSITE5)) {
                return -EINVAL;
@@ -1266,7 +1274,7 @@ static int saa711x_s_routing(struct v4l2_subdev *sd,
        state->input = input;
 
        /* saa7111 has slightly different input numbering */
-       if (state->ident <= V4L2_IDENT_SAA7111A) {
+       if (state->ident <= SAA7111A) {
                if (input >= SAA7115_COMPOSITE4)
                        input -= 2;
                /* saa7111 specific */
@@ -1289,13 +1297,13 @@ static int saa711x_s_routing(struct v4l2_subdev *sd,
                        (state->input >= SAA7115_SVIDEO0 ? 0x80 : 0x0));
 
        state->output = output;
-       if (state->ident == V4L2_IDENT_SAA7114 ||
-                       state->ident == V4L2_IDENT_SAA7115) {
+       if (state->ident == SAA7114 ||
+                       state->ident == SAA7115) {
                saa711x_write(sd, R_83_X_PORT_I_O_ENA_AND_OUT_CLK,
                                (saa711x_read(sd, R_83_X_PORT_I_O_ENA_AND_OUT_CLK) & 0xfe) |
                                (state->output & 0x01));
        }
-       if (state->ident > V4L2_IDENT_SAA7111A) {
+       if (state->ident > SAA7111A) {
                if (config & SAA7115_IDQ_IS_DEFAULT)
                        saa711x_write(sd, R_85_I_PORT_SIGNAL_POLAR, 0x20);
                else
@@ -1308,7 +1316,7 @@ static int saa711x_s_gpio(struct v4l2_subdev *sd, u32 val)
 {
        struct saa711x_state *state = to_state(sd);
 
-       if (state->ident > V4L2_IDENT_SAA7111A)
+       if (state->ident > SAA7111A)
                return -EINVAL;
        saa711x_write(sd, 0x11, (saa711x_read(sd, 0x11) & 0x7f) |
                (val ? 0x80 : 0));
@@ -1398,7 +1406,7 @@ static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
 
        reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
 
-       if (state->ident == V4L2_IDENT_SAA7115) {
+       if (state->ident == SAA7115) {
                reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC);
 
                v4l2_dbg(1, debug, sd, "Status byte 1 (0x1e)=0x%02x\n", reg1e);
@@ -1449,7 +1457,7 @@ static int saa711x_g_input_status(struct v4l2_subdev *sd, u32 *status)
        int reg1f;
 
        *status = V4L2_IN_ST_NO_SIGNAL;
-       if (state->ident == V4L2_IDENT_SAA7115)
+       if (state->ident == SAA7115)
                reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC);
        reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
        if ((reg1f & 0xc1) == 0x81 && (reg1e & 0xc0) == 0x80)
@@ -1460,10 +1468,6 @@ static int saa711x_g_input_status(struct v4l2_subdev *sd, u32 *status)
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int saa711x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->val = saa711x_read(sd, reg->reg & 0xff);
        reg->size = 1;
        return 0;
@@ -1471,23 +1475,11 @@ static int saa711x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
 
 static int saa711x_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        saa711x_write(sd, reg->reg & 0xff, reg->val & 0xff);
        return 0;
 }
 #endif
 
-static int saa711x_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct saa711x_state *state = to_state(sd);
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, state->ident, 0);
-}
-
 static int saa711x_log_status(struct v4l2_subdev *sd)
 {
        struct saa711x_state *state = to_state(sd);
@@ -1496,7 +1488,7 @@ static int saa711x_log_status(struct v4l2_subdev *sd)
        int vcr;
 
        v4l2_info(sd, "Audio frequency: %d Hz\n", state->audclk_freq);
-       if (state->ident != V4L2_IDENT_SAA7115) {
+       if (state->ident != SAA7115) {
                /* status for the saa7114 */
                reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
                signalOk = (reg1f & 0xc1) == 0x81;
@@ -1547,7 +1539,6 @@ static const struct v4l2_ctrl_ops saa711x_ctrl_ops = {
 
 static const struct v4l2_subdev_core_ops saa711x_core_ops = {
        .log_status = saa711x_log_status,
-       .g_chip_ident = saa711x_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
@@ -1650,21 +1641,21 @@ static int saa711x_detect_chip(struct i2c_client *client,
                        if (chip_ver[0] & 0xf0) {
                                snprintf(name, CHIP_VER_SIZE, "saa711%ca", chip_id);
                                v4l_info(client, "saa7111a variant found\n");
-                               return V4L2_IDENT_SAA7111A;
+                               return SAA7111A;
                        }
-                       return V4L2_IDENT_SAA7111;
+                       return SAA7111;
                case '3':
-                       return V4L2_IDENT_SAA7113;
+                       return SAA7113;
                case '4':
-                       return V4L2_IDENT_SAA7114;
+                       return SAA7114;
                case '5':
-                       return V4L2_IDENT_SAA7115;
+                       return SAA7115;
                case '8':
-                       return V4L2_IDENT_SAA7118;
+                       return SAA7118;
                default:
                        v4l2_info(client,
                                  "WARNING: Philips/NXP chip unknown - Falling back to saa7111\n");
-                       return V4L2_IDENT_SAA7111;
+                       return SAA7111;
                }
        }
 
@@ -1695,7 +1686,7 @@ static int saa711x_detect_chip(struct i2c_client *client,
                        "It seems to be a %s chip (%*ph) @ 0x%x.\n",
                        name, 16, chip_ver, client->addr << 1);
 
-               return V4L2_IDENT_GM7113C;
+               return GM7113C;
        }
 
        /* Chip was not discovered. Return its ID and don't bind */
@@ -1774,19 +1765,19 @@ static int saa711x_probe(struct i2c_client *client,
        /* init to 60hz/48khz */
        state->crystal_freq = SAA7115_FREQ_24_576_MHZ;
        switch (state->ident) {
-       case V4L2_IDENT_SAA7111:
-       case V4L2_IDENT_SAA7111A:
+       case SAA7111:
+       case SAA7111A:
                saa711x_writeregs(sd, saa7111_init);
                break;
-       case V4L2_IDENT_GM7113C:
-       case V4L2_IDENT_SAA7113:
+       case GM7113C:
+       case SAA7113:
                saa711x_writeregs(sd, saa7113_init);
                break;
        default:
                state->crystal_freq = SAA7115_FREQ_32_11_MHZ;
                saa711x_writeregs(sd, saa7115_init_auto_input);
        }
-       if (state->ident > V4L2_IDENT_SAA7111A)
+       if (state->ident > SAA7111A)
                saa711x_writeregs(sd, saa7115_init_misc);
        saa711x_set_v4lstd(sd, V4L2_STD_NTSC);
        v4l2_ctrl_handler_setup(hdl);
index d9c388103e7aa0c3a54356e559004eda08610eb4..264b755bedcef417eee59f3adfcd99704118e278 100644 (file)
@@ -54,7 +54,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/saa7127.h>
 
 static int debug;
@@ -251,10 +250,15 @@ static struct i2c_reg_value saa7127_init_config_50hz_secam[] = {
  **********************************************************************
  */
 
+enum saa712x_model {
+       SAA7127,
+       SAA7129,
+};
+
 struct saa7127_state {
        struct v4l2_subdev sd;
        v4l2_std_id std;
-       u32 ident;
+       enum saa712x_model ident;
        enum saa7127_input_type input_type;
        enum saa7127_output_type output_type;
        int video_enable;
@@ -482,7 +486,7 @@ static int saa7127_set_std(struct v4l2_subdev *sd, v4l2_std_id std)
                inittab = saa7127_init_config_60hz;
                state->reg_61 = SAA7127_60HZ_DAC_CONTROL;
 
-       } else if (state->ident == V4L2_IDENT_SAA7129 &&
+       } else if (state->ident == SAA7129 &&
                   (std & V4L2_STD_SECAM) &&
                   !(std & (V4L2_STD_625_50 & ~V4L2_STD_SECAM))) {
 
@@ -517,7 +521,7 @@ static int saa7127_set_output_type(struct v4l2_subdev *sd, int output)
                break;
 
        case SAA7127_OUTPUT_TYPE_COMPOSITE:
-               if (state->ident == V4L2_IDENT_SAA7129)
+               if (state->ident == SAA7129)
                        state->reg_2d = 0x20;   /* CVBS only */
                else
                        state->reg_2d = 0x08;   /* 00001000 CVBS only, RGB DAC's off (high impedance mode) */
@@ -525,7 +529,7 @@ static int saa7127_set_output_type(struct v4l2_subdev *sd, int output)
                break;
 
        case SAA7127_OUTPUT_TYPE_SVIDEO:
-               if (state->ident == V4L2_IDENT_SAA7129)
+               if (state->ident == SAA7129)
                        state->reg_2d = 0x18;   /* Y + C */
                else
                        state->reg_2d = 0xff;   /*11111111  croma -> R, luma -> CVBS + G + B */
@@ -543,7 +547,7 @@ static int saa7127_set_output_type(struct v4l2_subdev *sd, int output)
                break;
 
        case SAA7127_OUTPUT_TYPE_BOTH:
-               if (state->ident == V4L2_IDENT_SAA7129)
+               if (state->ident == SAA7129)
                        state->reg_2d = 0x38;
                else
                        state->reg_2d = 0xbf;
@@ -661,10 +665,6 @@ static int saa7127_s_vbi_data(struct v4l2_subdev *sd, const struct v4l2_sliced_v
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int saa7127_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->val = saa7127_read(sd, reg->reg & 0xff);
        reg->size = 1;
        return 0;
@@ -672,23 +672,11 @@ static int saa7127_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
 
 static int saa7127_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        saa7127_write(sd, reg->reg & 0xff, reg->val & 0xff);
        return 0;
 }
 #endif
 
-static int saa7127_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct saa7127_state *state = to_state(sd);
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, state->ident, 0);
-}
-
 static int saa7127_log_status(struct v4l2_subdev *sd)
 {
        struct saa7127_state *state = to_state(sd);
@@ -708,7 +696,6 @@ static int saa7127_log_status(struct v4l2_subdev *sd)
 
 static const struct v4l2_subdev_core_ops saa7127_core_ops = {
        .log_status = saa7127_log_status,
-       .g_chip_ident = saa7127_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = saa7127_g_register,
        .s_register = saa7127_s_register,
@@ -777,10 +764,10 @@ static int saa7127_probe(struct i2c_client *client,
                if (saa7127_read(sd, SAA7129_REG_FADE_KEY_COL2) == 0xaa) {
                        saa7127_write(sd, SAA7129_REG_FADE_KEY_COL2,
                                        read_result);
-                       state->ident = V4L2_IDENT_SAA7129;
+                       state->ident = SAA7129;
                        strlcpy(client->name, "saa7129", I2C_NAME_SIZE);
                } else {
-                       state->ident = V4L2_IDENT_SAA7127;
+                       state->ident = SAA7127;
                        strlcpy(client->name, "saa7127", I2C_NAME_SIZE);
                }
        }
@@ -804,7 +791,7 @@ static int saa7127_probe(struct i2c_client *client,
                saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_NORMAL);
        saa7127_set_video_enable(sd, 1);
 
-       if (state->ident == V4L2_IDENT_SAA7129)
+       if (state->ident == SAA7129)
                saa7127_write_inittab(sd, saa7129_init_config_extra);
        return 0;
 }
@@ -825,10 +812,10 @@ static int saa7127_remove(struct i2c_client *client)
 
 static struct i2c_device_id saa7127_id[] = {
        { "saa7127_auto", 0 },  /* auto-detection */
-       { "saa7126", V4L2_IDENT_SAA7127 },
-       { "saa7127", V4L2_IDENT_SAA7127 },
-       { "saa7128", V4L2_IDENT_SAA7129 },
-       { "saa7129", V4L2_IDENT_SAA7129 },
+       { "saa7126", SAA7127 },
+       { "saa7127", SAA7127 },
+       { "saa7128", SAA7129 },
+       { "saa7129", SAA7129 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, saa7127_id);
index 330a04c589391b0989296c40cb05c9a37e98907d..401ca114ab99cbf43a4145b1b4c2d3fdd768b932 100644 (file)
@@ -977,10 +977,6 @@ static int saa717x_s_video_routing(struct v4l2_subdev *sd,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int saa717x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->val = saa717x_read(sd, reg->reg);
        reg->size = 1;
        return 0;
@@ -988,12 +984,9 @@ static int saa717x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
 
 static int saa717x_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
        u16 addr = reg->reg & 0xffff;
        u8 val = reg->val & 0xff;
 
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        saa717x_write(sd, addr, val);
        return 0;
 }
index e95a0edc7f3ed9318046440584f1177ef1f73f8a..f56c1c88b27d6c0de3dc6536ed2191511ec87a57 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 
 MODULE_DESCRIPTION("Philips SAA7185 video encoder driver");
 MODULE_AUTHOR("Dave Perks");
@@ -285,17 +284,9 @@ static int saa7185_s_routing(struct v4l2_subdev *sd,
        return 0;
 }
 
-static int saa7185_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_SAA7185, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_subdev_core_ops saa7185_core_ops = {
-       .g_chip_ident = saa7185_g_chip_ident,
        .init = saa7185_init,
 };
 
index 84f7899a40443463b0ea23207092aa15b8fac393..08dcaecbeb9853653da6542c6784ad876915bbe4 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/videodev2.h>
 #include <linux/i2c.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 
 #include "saa7191.h"
 
@@ -567,18 +566,9 @@ static int saa7191_g_input_status(struct v4l2_subdev *sd, u32 *status)
 }
 
 
-static int saa7191_g_chip_ident(struct v4l2_subdev *sd,
-               struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_SAA7191, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
 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,
        .s_std = saa7191_s_std,
index 3f1266246ca3ed4536a24e06df32d9e751eb5f73..fbdff8b24eecd7d7b423b25a8ac4962e466299f5 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/slab.h>
 #include <linux/i2c.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 
 MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
 MODULE_DESCRIPTION("tda9840 driver");
@@ -145,26 +144,14 @@ static int tda9840_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *t)
        return 0;
 }
 
-static int tda9840_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TDA9840, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
-static const struct v4l2_subdev_core_ops tda9840_core_ops = {
-       .g_chip_ident = tda9840_g_chip_ident,
-};
-
 static const struct v4l2_subdev_tuner_ops tda9840_tuner_ops = {
        .s_tuner = tda9840_s_tuner,
        .g_tuner = tda9840_g_tuner,
 };
 
 static const struct v4l2_subdev_ops tda9840_ops = {
-       .core = &tda9840_core_ops,
        .tuner = &tda9840_tuner_ops,
 };
 
index 52ebc384e4539a8ce577af906f479662482c3ca8..bbe1a99fda366247e2d9d0b7598a74ca0a460761 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/slab.h>
 #include <linux/i2c.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include "tea6415c.h"
 
 MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
@@ -119,25 +118,13 @@ static int tea6415c_s_routing(struct v4l2_subdev *sd,
        return ret;
 }
 
-static int tea6415c_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TEA6415C, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
-static const struct v4l2_subdev_core_ops tea6415c_core_ops = {
-       .g_chip_ident = tea6415c_g_chip_ident,
-};
-
 static const struct v4l2_subdev_video_ops tea6415c_video_ops = {
        .s_routing = tea6415c_s_routing,
 };
 
 static const struct v4l2_subdev_ops tea6415c_ops = {
-       .core = &tea6415c_core_ops,
        .video = &tea6415c_video_ops,
 };
 
index 1f869742e3fe2bf579088eb66b5e65504ccdc065..30a8d75771af9622ac006c90f2dd660346af0dab 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/slab.h>
 #include <linux/i2c.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include "tea6420.h"
 
 MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
@@ -90,25 +89,13 @@ static int tea6420_s_routing(struct v4l2_subdev *sd,
        return 0;
 }
 
-static int tea6420_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TEA6420, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
-static const struct v4l2_subdev_core_ops tea6420_core_ops = {
-       .g_chip_ident = tea6420_g_chip_ident,
-};
-
 static const struct v4l2_subdev_audio_ops tea6420_audio_ops = {
        .s_routing = tea6420_s_routing,
 };
 
 static const struct v4l2_subdev_ops tea6420_ops = {
-       .core = &tea6420_core_ops,
        .audio = &tea6420_audio_ops,
 };
 
index b954195cfbe7bbc02ccab00d478ecc50d22f6b8e..2e17abc7731065e913a84037e5a93690883c73a0 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/slab.h>
 
 #include <media/ths7303.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-device.h>
 
 #define THS7303_CHANNEL_1      1
@@ -212,15 +211,6 @@ static int ths7303_s_dv_timings(struct v4l2_subdev *sd,
        return ths7303_config(sd);
 }
 
-static int ths7303_g_chip_ident(struct v4l2_subdev *sd,
-                               struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-       struct ths7303_state *state = to_state(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, state->driver_data, 0);
-}
-
 static const struct v4l2_subdev_video_ops ths7303_video_ops = {
        .s_stream       = ths7303_s_stream,
        .s_std_output   = ths7303_s_std_output,
@@ -232,11 +222,6 @@ static const struct v4l2_subdev_video_ops ths7303_video_ops = {
 static int ths7303_g_register(struct v4l2_subdev *sd,
                              struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
-
        reg->size = 1;
        reg->val = ths7303_read(sd, reg->reg);
        return 0;
@@ -245,11 +230,6 @@ static int ths7303_g_register(struct v4l2_subdev *sd,
 static int ths7303_s_register(struct v4l2_subdev *sd,
                              const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
-
        ths7303_write(sd, reg->reg, reg->val);
        return 0;
 }
@@ -336,7 +316,6 @@ static int ths7303_log_status(struct v4l2_subdev *sd)
 }
 
 static const struct v4l2_subdev_core_ops ths7303_core_ops = {
-       .g_chip_ident = ths7303_g_chip_ident,
        .log_status = ths7303_log_status,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = ths7303_g_register,
@@ -398,8 +377,8 @@ static int ths7303_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ths7303_id[] = {
-       {"ths7303", V4L2_IDENT_THS7303},
-       {"ths7353", V4L2_IDENT_THS7353},
+       {"ths7303", 0},
+       {"ths7353", 0},
        {},
 };
 
index fc69e9c27343e5e4cabf38670698e76565ed4592..38135402019ef76cb5b8b54913a20aee26f148c3 100644 (file)
@@ -38,7 +38,6 @@
 
 #include <media/tvaudio.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 
 #include <media/i2c-addr.h>
@@ -1838,13 +1837,6 @@ static int tvaudio_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequen
        return 0;
 }
 
-static int tvaudio_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TVAUDIO, 0);
-}
-
 static int tvaudio_log_status(struct v4l2_subdev *sd)
 {
        struct CHIPSTATE *chip = to_state(sd);
@@ -1863,7 +1855,6 @@ static const struct v4l2_ctrl_ops tvaudio_ctrl_ops = {
 
 static const struct v4l2_subdev_core_ops tvaudio_core_ops = {
        .log_status = tvaudio_log_status,
-       .g_chip_ident = tvaudio_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
index 7438e015d879995d792bb36322412ad963e89a5a..b5c17eb89b4ece37b0a00bede7c7ec5b50c6f713 100644 (file)
@@ -39,7 +39,6 @@
 #include <media/v4l2-device.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-mediabus.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 #include <media/tvp514x.h>
 #include <media/media-entity.h>
index b3cf26628c09a8a443b6387185639b4b68fd9677..bef528233f7ecfba3fd28de5a1d0a2ec543cd547 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/module.h>
 #include <media/v4l2-device.h>
 #include <media/tvp5150.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 
 #include "tvp5150_reg.h"
@@ -1031,29 +1030,11 @@ static int tvp5150_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_f
        return 0;
 }
 
-static int tvp5150_g_chip_ident(struct v4l2_subdev *sd,
-                               struct v4l2_dbg_chip_ident *chip)
-{
-       int rev;
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       rev = tvp5150_read(sd, TVP5150_ROM_MAJOR_VER) << 8 |
-             tvp5150_read(sd, TVP5150_ROM_MINOR_VER);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TVP5150,
-                                         rev);
-}
-
-
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int tvp5150_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
        int res;
 
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        res = tvp5150_read(sd, reg->reg & 0xff);
        if (res < 0) {
                v4l2_err(sd, "%s: failed with error = %d\n", __func__, res);
@@ -1067,10 +1048,6 @@ static int tvp5150_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
 
 static int tvp5150_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        tvp5150_write(sd, reg->reg & 0xff, reg->val & 0xff);
        return 0;
 }
@@ -1094,7 +1071,6 @@ static const struct v4l2_subdev_core_ops tvp5150_core_ops = {
        .log_status = tvp5150_log_status,
        .s_std = tvp5150_s_std,
        .reset = tvp5150_reset,
-       .g_chip_ident = tvp5150_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = tvp5150_g_register,
        .s_register = tvp5150_s_register,
index f339e6faca90ade8c71bd32abca75fe18f265535..c2d0280ef3dcdfbff3adf458da2c2b4de69ecef1 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/v4l2-dv-timings.h>
 #include <media/tvp7002.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ctrls.h>
 #include "tvp7002_reg.h"
@@ -532,29 +531,6 @@ static inline void tvp7002_write_err(struct v4l2_subdev *sd, u8 reg,
                *err = tvp7002_write(sd, reg, val);
 }
 
-/*
- * tvp7002_g_chip_ident() - Get chip identification number
- * @sd: ptr to v4l2_subdev struct
- * @chip: ptr to v4l2_dbg_chip_ident struct
- *
- * Obtains the chip's identification number.
- * Returns zero or -EINVAL if read operation fails.
- */
-static int tvp7002_g_chip_ident(struct v4l2_subdev *sd,
-                                       struct v4l2_dbg_chip_ident *chip)
-{
-       u8 rev;
-       int error;
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       error = tvp7002_read(sd, TVP7002_CHIP_REV, &rev);
-
-       if (error < 0)
-               return error;
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TVP7002, rev);
-}
-
 /*
  * tvp7002_write_inittab() - Write initialization values
  * @sd: ptr to v4l2_subdev struct
@@ -741,13 +717,9 @@ static int tvp7002_query_dv_timings(struct v4l2_subdev *sd,
 static int tvp7002_g_register(struct v4l2_subdev *sd,
                                                struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
        u8 val;
        int ret;
 
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
-
        ret = tvp7002_read(sd, reg->reg & 0xff, &val);
        reg->val = val;
        return ret;
@@ -764,11 +736,6 @@ static int tvp7002_g_register(struct v4l2_subdev *sd,
 static int tvp7002_s_register(struct v4l2_subdev *sd,
                                                const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
-
        return tvp7002_write(sd, reg->reg & 0xff, reg->val & 0xff);
 }
 #endif
@@ -933,7 +900,6 @@ tvp7002_set_pad_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
 
 /* V4L2 core operation handlers */
 static const struct v4l2_subdev_core_ops tvp7002_core_ops = {
-       .g_chip_ident = tvp7002_g_chip_ident,
        .log_status = tvp7002_log_status,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
index 41a5c9b31006c3077f3900c0858b71c4c4fd997a..f58607df61930b7422b2e4ac25a9a5d84fac13b6 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/slab.h>
 #include <media/v4l2-subdev.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 
 #define TW2804_REG_AUTOGAIN            0x02
index 13a4cf8bebdfa177392928af61c1d5cc7699cd49..d248e6a12b8edd67166cc7d3d62f9bce50e6a09e 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/videodev2.h>
 #include <linux/slab.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/upd64031a.h>
 
 /* --------------------- read registers functions define -------------------- */
@@ -147,13 +146,6 @@ static int upd64031a_s_routing(struct v4l2_subdev *sd,
        return upd64031a_s_frequency(sd, NULL);
 }
 
-static int upd64031a_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_UPD64031A, 0);
-}
-
 static int upd64031a_log_status(struct v4l2_subdev *sd)
 {
        v4l2_info(sd, "Status: SA00=0x%02x SA01=0x%02x\n",
@@ -164,10 +156,6 @@ static int upd64031a_log_status(struct v4l2_subdev *sd)
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int upd64031a_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->val = upd64031a_read(sd, reg->reg & 0xff);
        reg->size = 1;
        return 0;
@@ -175,10 +163,6 @@ static int upd64031a_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register
 
 static int upd64031a_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        upd64031a_write(sd, reg->reg & 0xff, reg->val & 0xff);
        return 0;
 }
@@ -188,7 +172,6 @@ static int upd64031a_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_re
 
 static const struct v4l2_subdev_core_ops upd64031a_core_ops = {
        .log_status = upd64031a_log_status,
-       .g_chip_ident = upd64031a_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = upd64031a_g_register,
        .s_register = upd64031a_s_register,
index e296639ab90e912fb54e23ec7b74acd16b808783..3a152ce7258a7e2feeda49300c1dc9ac2fd05f4d 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/videodev2.h>
 #include <linux/slab.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/upd64083.h>
 
 MODULE_DESCRIPTION("uPD64083 driver");
@@ -122,10 +121,6 @@ static int upd64083_s_routing(struct v4l2_subdev *sd,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int upd64083_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->val = upd64083_read(sd, reg->reg & 0xff);
        reg->size = 1;
        return 0;
@@ -133,22 +128,11 @@ static int upd64083_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register
 
 static int upd64083_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        upd64083_write(sd, reg->reg & 0xff, reg->val & 0xff);
        return 0;
 }
 #endif
 
-static int upd64083_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_UPD64083, 0);
-}
-
 static int upd64083_log_status(struct v4l2_subdev *sd)
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -165,7 +149,6 @@ static int upd64083_log_status(struct v4l2_subdev *sd)
 
 static const struct v4l2_subdev_core_ops upd64083_core_ops = {
        .log_status = upd64083_log_status,
-       .g_chip_ident = upd64083_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = upd64083_g_register,
        .s_register = upd64083_s_register,
index 208a095d7bcc96b8791c4f551f5fe87f08997a48..6a3a3ff7ee6a8b5ba68233ee6f042ddd19e6529d 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 
 MODULE_DESCRIPTION("vp27smpx driver");
 MODULE_AUTHOR("Hans Verkuil");
@@ -112,13 +111,6 @@ static int vp27smpx_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
        return 0;
 }
 
-static int vp27smpx_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_VP27SMPX, 0);
-}
-
 static int vp27smpx_log_status(struct v4l2_subdev *sd)
 {
        struct vp27smpx_state *state = to_state(sd);
@@ -132,7 +124,6 @@ static int vp27smpx_log_status(struct v4l2_subdev *sd)
 
 static const struct v4l2_subdev_core_ops vp27smpx_core_ops = {
        .log_status = vp27smpx_log_status,
-       .g_chip_ident = vp27smpx_g_chip_ident,
        .s_std = vp27smpx_s_std,
 };
 
index f02e74b9b1ac83f56f13987f43faaddf48c610f4..4c57d8a67c22912af7483846b352adb3cbb8619b 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 
 MODULE_DESCRIPTION("vpx3220a/vpx3216b/vpx3214c video decoder driver");
@@ -49,7 +48,6 @@ struct vpx3220 {
        unsigned char reg[255];
 
        v4l2_std_id norm;
-       int ident;
        int input;
        int enable;
 };
@@ -442,14 +440,6 @@ static int vpx3220_s_ctrl(struct v4l2_ctrl *ctrl)
        return -EINVAL;
 }
 
-static int vpx3220_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct vpx3220 *decoder = to_vpx3220(sd);
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, decoder->ident, 0);
-}
-
 /* ----------------------------------------------------------------------- */
 
 static const struct v4l2_ctrl_ops vpx3220_ctrl_ops = {
@@ -457,7 +447,6 @@ static const struct v4l2_ctrl_ops vpx3220_ctrl_ops = {
 };
 
 static const struct v4l2_subdev_core_ops vpx3220_core_ops = {
-       .g_chip_ident = vpx3220_g_chip_ident,
        .init = vpx3220_init,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
@@ -528,7 +517,6 @@ static int vpx3220_probe(struct i2c_client *client,
        ver = i2c_smbus_read_byte_data(client, 0x00);
        pn = (i2c_smbus_read_byte_data(client, 0x02) << 8) +
                i2c_smbus_read_byte_data(client, 0x01);
-       decoder->ident = V4L2_IDENT_VPX3220A;
        if (ver == 0xec) {
                switch (pn) {
                case 0x4680:
@@ -536,11 +524,9 @@ static int vpx3220_probe(struct i2c_client *client,
                        break;
                case 0x4260:
                        name = "vpx3216b";
-                       decoder->ident = V4L2_IDENT_VPX3216B;
                        break;
                case 0x4280:
                        name = "vpx3214c";
-                       decoder->ident = V4L2_IDENT_VPX3214C;
                        break;
                }
        }
index d2209a35c510ed2b4102a691012e6fe30474b525..25bdd9312fea5a0f1de997632fd02e4e9b6a8ae1 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/types.h>
 #include <linux/videodev2.h>
 
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-mediabus.h>
@@ -722,25 +721,9 @@ static int vs6624_s_stream(struct v4l2_subdev *sd, int enable)
        return 0;
 }
 
-static int vs6624_g_chip_ident(struct v4l2_subdev *sd,
-               struct v4l2_dbg_chip_ident *chip)
-{
-       int rev;
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       rev = (vs6624_read(sd, VS6624_FW_VSN_MAJOR) << 8)
-               | vs6624_read(sd, VS6624_FW_VSN_MINOR);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_VS6624, rev);
-}
-
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int vs6624_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        reg->val = vs6624_read(sd, reg->reg & 0xffff);
        reg->size = 1;
        return 0;
@@ -748,10 +731,6 @@ static int vs6624_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r
 
 static int vs6624_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 {
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       if (!v4l2_chip_match_i2c_client(client, &reg->match))
-               return -EINVAL;
        vs6624_write(sd, reg->reg & 0xffff, reg->val & 0xff);
        return 0;
 }
@@ -762,7 +741,6 @@ static const struct v4l2_ctrl_ops vs6624_ctrl_ops = {
 };
 
 static const struct v4l2_subdev_core_ops vs6624_core_ops = {
-       .g_chip_ident = vs6624_g_chip_ident,
 #ifdef CONFIG_VIDEO_ADV_DEBUG
        .g_register = vs6624_g_register,
        .s_register = vs6624_s_register,
index ac3faa7bab2d46c656b3e86417705ae382ba7e57..3be73f6a40e95c9c121c3edb97596cd149cf3b29 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 
 MODULE_DESCRIPTION("wm8739 driver");
@@ -160,13 +159,6 @@ static int wm8739_s_clock_freq(struct v4l2_subdev *sd, u32 audiofreq)
        return 0;
 }
 
-static int wm8739_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_WM8739, 0);
-}
-
 static int wm8739_log_status(struct v4l2_subdev *sd)
 {
        struct wm8739_state *state = to_state(sd);
@@ -184,7 +176,6 @@ static const struct v4l2_ctrl_ops wm8739_ctrl_ops = {
 
 static const struct v4l2_subdev_core_ops wm8739_core_ops = {
        .log_status = wm8739_log_status,
-       .g_chip_ident = wm8739_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
index 75ded82d513ff63b22dff2751313dbbb9e3e639f..3f584a7d0781b9860aad6b6bb9f6ddef4ad2b449 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
-#include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 #include <media/wm8775.h>
 
@@ -158,13 +157,6 @@ static int wm8775_s_ctrl(struct v4l2_ctrl *ctrl)
        return -EINVAL;
 }
 
-static int wm8775_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
-{
-       struct i2c_client *client = v4l2_get_subdevdata(sd);
-
-       return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_WM8775, 0);
-}
-
 static int wm8775_log_status(struct v4l2_subdev *sd)
 {
        struct wm8775_state *state = to_state(sd);
@@ -188,7 +180,6 @@ static const struct v4l2_ctrl_ops wm8775_ctrl_ops = {
 
 static const struct v4l2_subdev_core_ops wm8775_core_ops = {
        .log_status = wm8775_log_status,
-       .g_chip_ident = wm8775_g_chip_ident,
        .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
        .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
        .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,