Merge branch 'x86-reboot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / drivers / media / i2c / bt819.c
index ee9ed67..369cf6f 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;
 };
@@ -217,15 +215,17 @@ static int bt819_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pstd)
        struct bt819 *decoder = to_bt819(sd);
        int status = bt819_read(decoder, 0x00);
        int res = V4L2_IN_ST_NO_SIGNAL;
-       v4l2_std_id std;
+       v4l2_std_id std = pstd ? *pstd : V4L2_STD_ALL;
 
        if ((status & 0x80))
                res = 0;
+       else
+               std = V4L2_STD_UNKNOWN;
 
        if ((status & 0x10))
-               std = V4L2_STD_PAL;
+               std &= V4L2_STD_PAL;
        else
-               std = V4L2_STD_NTSC;
+               std &= V4L2_STD_NTSC;
        if (pstd)
                *pstd = std;
        if (pstatus)
@@ -373,14 +373,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 +380,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 +426,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,