Commit de08b5a8 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[media] v4l: exynos4-is: Drop unneeded check when setting up fimc-lite links

The driver verifies that the type of the remote entity matches its
expectations when setting up fimc-lite links and returns an error if it
doesn't. Those checks can never fail as the links are created by the
driver in a way that always match its expectations (the SINK and
SOURCE_ISP pads are connected to subdevs only and the SOURCE_DMA pad is
connected to a video node only). Remove them.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 02650ebd
...@@ -992,10 +992,6 @@ static int fimc_lite_link_setup(struct media_entity *entity, ...@@ -992,10 +992,6 @@ static int fimc_lite_link_setup(struct media_entity *entity,
switch (local->index) { switch (local->index) {
case FLITE_SD_PAD_SINK: case FLITE_SD_PAD_SINK:
if (!is_media_entity_v4l2_subdev(remote->entity)) {
ret = -EINVAL;
break;
}
if (flags & MEDIA_LNK_FL_ENABLED) { if (flags & MEDIA_LNK_FL_ENABLED) {
if (fimc->source_subdev_grp_id == 0) if (fimc->source_subdev_grp_id == 0)
fimc->source_subdev_grp_id = sd->grp_id; fimc->source_subdev_grp_id = sd->grp_id;
...@@ -1010,19 +1006,15 @@ static int fimc_lite_link_setup(struct media_entity *entity, ...@@ -1010,19 +1006,15 @@ static int fimc_lite_link_setup(struct media_entity *entity,
case FLITE_SD_PAD_SOURCE_DMA: case FLITE_SD_PAD_SOURCE_DMA:
if (!(flags & MEDIA_LNK_FL_ENABLED)) if (!(flags & MEDIA_LNK_FL_ENABLED))
atomic_set(&fimc->out_path, FIMC_IO_NONE); atomic_set(&fimc->out_path, FIMC_IO_NONE);
else if (is_media_entity_v4l2_io(remote->entity))
atomic_set(&fimc->out_path, FIMC_IO_DMA);
else else
ret = -EINVAL; atomic_set(&fimc->out_path, FIMC_IO_DMA);
break; break;
case FLITE_SD_PAD_SOURCE_ISP: case FLITE_SD_PAD_SOURCE_ISP:
if (!(flags & MEDIA_LNK_FL_ENABLED)) if (!(flags & MEDIA_LNK_FL_ENABLED))
atomic_set(&fimc->out_path, FIMC_IO_NONE); atomic_set(&fimc->out_path, FIMC_IO_NONE);
else if (is_media_entity_v4l2_subdev(remote->entity))
atomic_set(&fimc->out_path, FIMC_IO_ISP);
else else
ret = -EINVAL; atomic_set(&fimc->out_path, FIMC_IO_ISP);
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment