summaryrefslogtreecommitdiff
path: root/drivers/media/platform/exynos4-is/media-dev.h
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-04-09 11:11:58 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-14 15:48:44 -0300
commit4c8f0629f53bb198ed00c2c54cf80cc2be95acab (patch)
treeeff60e69d410225ead429093e6dc4a97fcb70e3a /drivers/media/platform/exynos4-is/media-dev.h
parent756e6e14484b3249dad9663ed1398711b62676a3 (diff)
[media] exynos4-is: Make fimc-lite independent of struct fimc_sensor_info
Make the sensor subdevs host_data hold a pointer to struct fimc_source_info, which is defined in the driver's public header, rather than a pointer to struct fimc_sensor_info which is specific to exynos4-is media device driver. The purpose of this change is to allow easier reuse of the fimc-lite module in the exynos5-is driver, which should similarly store a pointer to struct fimc_source_info instance in the sensor's subdev host_data. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is/media-dev.h')
-rw-r--r--drivers/media/platform/exynos4-is/media-dev.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/platform/exynos4-is/media-dev.h b/drivers/media/platform/exynos4-is/media-dev.h
index 7f126c3adacf..44d86b61d660 100644
--- a/drivers/media/platform/exynos4-is/media-dev.h
+++ b/drivers/media/platform/exynos4-is/media-dev.h
@@ -115,6 +115,12 @@ struct fimc_md {
#define subdev_has_devnode(__sd) (__sd->flags & V4L2_SUBDEV_FL_HAS_DEVNODE)
+static inline
+struct fimc_sensor_info *source_to_sensor_info(struct fimc_source_info *si)
+{
+ return container_of(si, struct fimc_sensor_info, pdata);
+}
+
static inline struct fimc_md *entity_to_fimc_mdev(struct media_entity *me)
{
return me->parent == NULL ? NULL :