summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/exynos4-is
diff options
context:
space:
mode:
authorLaurent Pinchart2015-11-03 03:27:51 +0100
committerMauro Carvalho Chehab2016-09-09 16:20:09 +0200
commit68429f50ab60074e58b98010103fcc5bac4afd54 (patch)
tree79238fd7fd84b0d20692ef653c735c0fe22dfc57 /drivers/media/platform/exynos4-is
parent[media] smiapp: Add support for 14 and 16 bits per sample depths (diff)
downloadkernel-qcow2-linux-68429f50ab60074e58b98010103fcc5bac4afd54.tar.gz
kernel-qcow2-linux-68429f50ab60074e58b98010103fcc5bac4afd54.tar.xz
kernel-qcow2-linux-68429f50ab60074e58b98010103fcc5bac4afd54.zip
[media] media: Move media_device link_notify operation to an ops structure
This will allow adding new operations without increasing the media_device structure size for drivers that don't implement any media device operation. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is')
-rw-r--r--drivers/media/platform/exynos4-is/media-dev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index 891625e77ef5..1a1154a9dfa4 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -1190,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)
{
@@ -1416,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;