X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=drivers%2Fmedia%2Fplatform%2Fexynos4-is%2Fmedia-dev.c;h=1a1154a9dfa492e423ce220df6350fcd7689fa96;hb=7e75c99e6e2aac23b3e563b8c9e93d3e13afad1e;hp=4f494acd8150fd85f8aaedfb3572b85bb22b460d;hpb=6ea24cf79e055f0a62a64baa8587e2254a493c7b;p=deliverable%2Flinux.git diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 4f494acd8150..1a1154a9dfa4 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -446,8 +446,10 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd, else pd->fimc_bus_type = pd->sensor_bus_type; - if (WARN_ON(index >= ARRAY_SIZE(fmd->sensor))) + if (WARN_ON(index >= ARRAY_SIZE(fmd->sensor))) { + of_node_put(rem); return -EINVAL; + } fmd->sensor[index].asd.match_type = V4L2_ASYNC_MATCH_OF; fmd->sensor[index].asd.match.of.node = rem; @@ -1130,7 +1132,7 @@ static int __fimc_md_modify_pipelines(struct media_entity *entity, bool enable, media_entity_graph_walk_start(graph, entity); while ((entity = media_entity_graph_walk_next(graph))) { - if (!is_media_entity_v4l2_io(entity)) + if (!is_media_entity_v4l2_video_device(entity)) continue; ret = __fimc_md_modify_pipeline(entity, enable); @@ -1145,7 +1147,7 @@ err: media_entity_graph_walk_start(graph, entity_err); while ((entity_err = media_entity_graph_walk_next(graph))) { - if (!is_media_entity_v4l2_io(entity_err)) + if (!is_media_entity_v4l2_video_device(entity_err)) continue; __fimc_md_modify_pipeline(entity_err, !enable); @@ -1188,6 +1190,10 @@ static int fimc_md_link_notify(struct media_link *link, unsigned int flags, return ret ? -EPIPE : 0; } +static const struct media_device_ops fimc_md_ops = { + .link_notify = fimc_md_link_notify, +}; + static ssize_t fimc_md_sysfs_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -1414,7 +1420,7 @@ static int fimc_md_probe(struct platform_device *pdev) strlcpy(fmd->media_dev.model, "SAMSUNG S5P FIMC", sizeof(fmd->media_dev.model)); - fmd->media_dev.link_notify = fimc_md_link_notify; + fmd->media_dev.ops = &fimc_md_ops; fmd->media_dev.dev = dev; v4l2_dev = &fmd->v4l2_dev;