diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-20 09:06:25 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-05 22:02:34 -0300 |
commit | 7aaad13124598580dbce98d33618e9356412274c (patch) | |
tree | b1da481319dec1620a6836c81749fdec08ac003f /drivers/media/platform | |
parent | 33bf1786602d819dc0467e77816dfa3f2a7e459d (diff) | |
download | op-kernel-dev-7aaad13124598580dbce98d33618e9356412274c.zip op-kernel-dev-7aaad13124598580dbce98d33618e9356412274c.tar.gz |
[media] vpif_capture: move routing info from subdev to input
Routing information is a property of the input, not of the subdev.
One subdev may provide multiple inputs, each with its own routing
information.
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/platform')
-rw-r--r-- | drivers/media/platform/davinci/vpif_capture.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index d90e235..d668a3a 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -1464,6 +1464,9 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index) chan_cfg = &config->chan_config[ch->channel_id]; + if (index >= chan_cfg->input_count) + return -EINVAL; + if (common->started) { vpif_err("Streaming in progress\n"); return -EBUSY; @@ -1502,8 +1505,8 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index) } } - input = subdev_info->input; - output = subdev_info->output; + input = chan_cfg->inputs[index].input_route; + output = chan_cfg->inputs[index].output_route; ret = v4l2_subdev_call(vpif_obj.sd[sd_index], video, s_routing, input, output, 0); if (ret < 0 && ret != -ENOIOCTLCMD) { |