diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-20 08:06:24 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-05 21:02:10 -0400 |
commit | 33bf1786602d819dc0467e77816dfa3f2a7e459d (patch) | |
tree | 38da693be2f556d21a02b7859c9c159e4ecf80d7 /drivers/media | |
parent | 311673ee9b6746aa366cc19049899308ce8bd01f (diff) |
[media] vpif_capture: remove unnecessary can_route flag
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/davinci/vpif_capture.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index 834510679c6d..d90e23596541 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c | |||
@@ -1502,15 +1502,13 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index) | |||
1502 | } | 1502 | } |
1503 | } | 1503 | } |
1504 | 1504 | ||
1505 | if (subdev_info->can_route) { | 1505 | input = subdev_info->input; |
1506 | input = subdev_info->input; | 1506 | output = subdev_info->output; |
1507 | output = subdev_info->output; | 1507 | ret = v4l2_subdev_call(vpif_obj.sd[sd_index], video, s_routing, |
1508 | ret = v4l2_subdev_call(vpif_obj.sd[sd_index], video, s_routing, | 1508 | input, output, 0); |
1509 | input, output, 0); | 1509 | if (ret < 0 && ret != -ENOIOCTLCMD) { |
1510 | if (ret < 0) { | 1510 | vpif_dbg(1, debug, "Failed to set input\n"); |
1511 | vpif_dbg(1, debug, "Failed to set input\n"); | 1511 | return ret; |
1512 | return ret; | ||
1513 | } | ||
1514 | } | 1512 | } |
1515 | ch->input_idx = index; | 1513 | ch->input_idx = index; |
1516 | ch->curr_subdev_info = subdev_info; | 1514 | ch->curr_subdev_info = subdev_info; |
@@ -1520,7 +1518,7 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index) | |||
1520 | 1518 | ||
1521 | /* update tvnorms from the sub device input info */ | 1519 | /* update tvnorms from the sub device input info */ |
1522 | ch->video_dev->tvnorms = chan_cfg->inputs[index].input.std; | 1520 | ch->video_dev->tvnorms = chan_cfg->inputs[index].input.std; |
1523 | return ret; | 1521 | return 0; |
1524 | } | 1522 | } |
1525 | 1523 | ||
1526 | /** | 1524 | /** |