Commit a967a3a7 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

media: mc: Get media_device directly from pad

Various functions access the media_device from a pad by going through
the entity the pad belongs to. Remove the level of indirection and get
the media_device from the pad directly.

Fixes: 9e3576a1 ("media: mc: convert pipeline funcs to take media_pad")
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent e1610209
...@@ -716,7 +716,7 @@ static int media_pipeline_populate(struct media_pipeline *pipe, ...@@ -716,7 +716,7 @@ static int media_pipeline_populate(struct media_pipeline *pipe,
__must_check int __media_pipeline_start(struct media_pad *pad, __must_check int __media_pipeline_start(struct media_pad *pad,
struct media_pipeline *pipe) struct media_pipeline *pipe)
{ {
struct media_device *mdev = pad->entity->graph_obj.mdev; struct media_device *mdev = pad->graph_obj.mdev;
struct media_pipeline_pad *err_ppad; struct media_pipeline_pad *err_ppad;
struct media_pipeline_pad *ppad; struct media_pipeline_pad *ppad;
int ret; int ret;
...@@ -864,7 +864,7 @@ EXPORT_SYMBOL_GPL(__media_pipeline_start); ...@@ -864,7 +864,7 @@ EXPORT_SYMBOL_GPL(__media_pipeline_start);
__must_check int media_pipeline_start(struct media_pad *pad, __must_check int media_pipeline_start(struct media_pad *pad,
struct media_pipeline *pipe) struct media_pipeline *pipe)
{ {
struct media_device *mdev = pad->entity->graph_obj.mdev; struct media_device *mdev = pad->graph_obj.mdev;
int ret; int ret;
mutex_lock(&mdev->graph_mutex); mutex_lock(&mdev->graph_mutex);
...@@ -901,7 +901,7 @@ EXPORT_SYMBOL_GPL(__media_pipeline_stop); ...@@ -901,7 +901,7 @@ EXPORT_SYMBOL_GPL(__media_pipeline_stop);
void media_pipeline_stop(struct media_pad *pad) void media_pipeline_stop(struct media_pad *pad)
{ {
struct media_device *mdev = pad->entity->graph_obj.mdev; struct media_device *mdev = pad->graph_obj.mdev;
mutex_lock(&mdev->graph_mutex); mutex_lock(&mdev->graph_mutex);
__media_pipeline_stop(pad); __media_pipeline_stop(pad);
...@@ -911,7 +911,7 @@ EXPORT_SYMBOL_GPL(media_pipeline_stop); ...@@ -911,7 +911,7 @@ EXPORT_SYMBOL_GPL(media_pipeline_stop);
__must_check int media_pipeline_alloc_start(struct media_pad *pad) __must_check int media_pipeline_alloc_start(struct media_pad *pad)
{ {
struct media_device *mdev = pad->entity->graph_obj.mdev; struct media_device *mdev = pad->graph_obj.mdev;
struct media_pipeline *new_pipe = NULL; struct media_pipeline *new_pipe = NULL;
struct media_pipeline *pipe; struct media_pipeline *pipe;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment