[media] vpif_capture: remove unnecessary can_route flag
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 20 Sep 2012 12:06:24 +0000 (09:06 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 6 Oct 2012 01:02:10 +0000 (22:02 -0300)
Calling a subdev op that isn't implemented will just return -ENOIOCTLCMD
No need to have a flag for that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/board-dm646x-evm.c
drivers/media/platform/davinci/vpif_capture.c
include/media/davinci/vpif_types.h

index d0954a29d7424d6f786090f1f210e37a55b1c4f8..d92e0ab8c2799f2c73e39e4c7df4adfb78afb55c 100644 (file)
@@ -1209,7 +1209,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = {
                },
                .input = INPUT_CVBS_VI2B,
                .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
-               .can_route = 1,
                .vpif_if = {
                        .if_type = VPIF_IF_BT656,
                        .hd_pol  = 1,
@@ -1225,7 +1224,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = {
                },
                .input = INPUT_SVIDEO_VI2C_VI1C,
                .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
-               .can_route = 1,
                .vpif_if = {
                        .if_type = VPIF_IF_BT656,
                        .hd_pol  = 1,
index 958679a20e13d3ec018e5b974ae35e1e17d400c0..a0be63b1dc0b88f705d2331a98f01a0a6b59cbd4 100644 (file)
@@ -603,7 +603,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = {
                },
                .input = INPUT_CVBS_VI2B,
                .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
-               .can_route = 1,
                .vpif_if = {
                        .if_type = VPIF_IF_BT656,
                        .hd_pol = 1,
@@ -619,7 +618,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = {
                },
                .input = INPUT_SVIDEO_VI2C_VI1C,
                .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
-               .can_route = 1,
                .vpif_if = {
                        .if_type = VPIF_IF_BT656,
                        .hd_pol = 1,
index 834510679c6dcdfa51826bac78dbb2c6838a68a7..d90e23596541357d35ce81a22d44a9041d6fa862 100644 (file)
@@ -1502,15 +1502,13 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index)
                }
        }
 
-       if (subdev_info->can_route) {
-               input = subdev_info->input;
-               output = subdev_info->output;
-               ret = v4l2_subdev_call(vpif_obj.sd[sd_index], video, s_routing,
-                                       input, output, 0);
-               if (ret < 0) {
-                       vpif_dbg(1, debug, "Failed to set input\n");
-                       return ret;
-               }
+       input = subdev_info->input;
+       output = subdev_info->output;
+       ret = v4l2_subdev_call(vpif_obj.sd[sd_index], video, s_routing,
+                       input, output, 0);
+       if (ret < 0 && ret != -ENOIOCTLCMD) {
+               vpif_dbg(1, debug, "Failed to set input\n");
+               return ret;
        }
        ch->input_idx = index;
        ch->curr_subdev_info = subdev_info;
@@ -1520,7 +1518,7 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index)
 
        /* update tvnorms from the sub device input info */
        ch->video_dev->tvnorms = chan_cfg->inputs[index].input.std;
-       return ret;
+       return 0;
 }
 
 /**
index d8f6ab1943e4e492679b1b4ae58ac1244496cc72..1fe46a51de7c1e1673897ae4e31ffcbfe3b4204f 100644 (file)
@@ -39,7 +39,6 @@ struct vpif_subdev_info {
        struct i2c_board_info board_info;
        u32 input;
        u32 output;
-       unsigned can_route:1;
        struct vpif_interface vpif_if;
 };