diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2015-08-19 18:35:21 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 17:18:43 +0300 |
commit | d10c98949d1a1fff14d750fe5162213bb5b39e11 (patch) | |
tree | 38440ce60bce2a2c239afc8a97461185fd046f8a /drivers/media/platform/exynos4-is/fimc-isp-video.c | |
parent | 8df00a15817e3a252510ac914870214859325189 (diff) | |
download | linux-d10c98949d1a1fff14d750fe5162213bb5b39e11.tar.xz |
[media] media: use entity.graph_obj.mdev instead of .parent
The struct media_entity has a .parent field that stores a pointer
to the parent struct media_device. But recently a media_gobj was
embedded into the entities and since struct media_gojb already has
a pointer to a struct media_device in the .mdev field, the .parent
field becomes redundant and can be removed.
This patch replaces all the usage of .parent by .graph_obj.mdev so
that field will become unused and can be removed on a later patch.
No functional changes.
The transformation was made using the following coccinelle spatch:
@@
struct media_entity *me;
@@
- me->parent
+ me->graph_obj.mdev
@@
struct media_entity *link;
@@
- link->source->entity->parent
+ link->source->entity->graph_obj.mdev
@@
struct exynos_video_entity *ve;
@@
- ve->vdev.entity.parent
+ ve->vdev.entity.graph_obj.mdev
Suggested-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is/fimc-isp-video.c')
-rw-r--r-- | drivers/media/platform/exynos4-is/fimc-isp-video.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c b/drivers/media/platform/exynos4-is/fimc-isp-video.c index 817226d52b74..239df7d8bd30 100644 --- a/drivers/media/platform/exynos4-is/fimc-isp-video.c +++ b/drivers/media/platform/exynos4-is/fimc-isp-video.c @@ -287,7 +287,7 @@ static int isp_video_open(struct file *file) goto rel_fh; if (v4l2_fh_is_singular_file(file)) { - mutex_lock(&me->parent->graph_mutex); + mutex_lock(&me->graph_obj.mdev->graph_mutex); ret = fimc_pipeline_call(ve, open, me, true); @@ -295,7 +295,7 @@ static int isp_video_open(struct file *file) if (ret == 0) me->use_count++; - mutex_unlock(&me->parent->graph_mutex); + mutex_unlock(&me->graph_obj.mdev->graph_mutex); } if (!ret) goto unlock; @@ -311,7 +311,7 @@ static int isp_video_release(struct file *file) struct fimc_isp *isp = video_drvdata(file); struct fimc_is_video *ivc = &isp->video_capture; struct media_entity *entity = &ivc->ve.vdev.entity; - struct media_device *mdev = entity->parent; + struct media_device *mdev = entity->graph_obj.mdev; mutex_lock(&isp->video_lock); |