diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-11-03 00:27:51 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-09 11:20:09 -0300 |
commit | 68429f50ab60074e58b98010103fcc5bac4afd54 (patch) | |
tree | 79238fd7fd84b0d20692ef653c735c0fe22dfc57 /drivers/media/platform/exynos4-is | |
parent | dc3cdbc9d4dc22948d7f934789ee71baba55bc82 (diff) |
[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.c | 6 |
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; |