Merge remote-tracking branch 'sound-asoc/for-next'
[deliverable/linux.git] / drivers / media / platform / exynos4-is / media-dev.c
index 4f494acd8150fd85f8aaedfb3572b85bb22b460d..1a1154a9dfa492e423ce220df6350fcd7689fa96 100644 (file)
@@ -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;
This page took 0.024953 seconds and 5 git commands to generate.