diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2016-11-21 19:48:30 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-27 21:13:24 +0300 |
commit | 20b852273642f41ce5c97601acb89185cbcee772 (patch) | |
tree | 657f4fa2c59e6928e0acf761ff9e75dfca8707f6 /drivers/staging/media/omap4iss/iss_video.c | |
parent | 12030f489ef87dd879400d65381482a1f2177adc (diff) | |
download | linux-20b852273642f41ce5c97601acb89185cbcee772.tar.xz |
[media] media: Rename graph and pipeline structs and functions
The media_entity_pipeline_start() and media_entity_pipeline_stop()
functions are renamed as media_pipeline_start() and media_pipeline_stop(),
respectively. The reason is two-fold: the pipeline struct is, rightly,
already called media_pipeline (rather than media_entity_pipeline) and what
this really is about is a pipeline. A pipeline consists of entities ---
and, well, other objects embedded in these entities.
As the pipeline object will be in the future moved from entities to pads
in order to support multiple pipelines through a single entity, do the
renaming now.
Similarly, functions operating on struct media_entity_graph as well as the
struct itself are renamed by dropping the "entity_" part from the prefix
of the function family and the data structure. The graph traversal which
is what the functions are about is not specifically about entities only
and will operate on pads for the same reason as the media pipeline.
The patch has been generated using the following command:
git grep -l media_entity |xargs perl -i -pe '
s/media_entity_pipeline/media_pipeline/g;
s/media_entity_graph/media_graph/g'
And a few manual edits related to line start alignment and line wrapping.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media/omap4iss/iss_video.c')
-rw-r--r-- | drivers/staging/media/omap4iss/iss_video.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c index c16927ac8eb0..f4b0e660109f 100644 --- a/drivers/staging/media/omap4iss/iss_video.c +++ b/drivers/staging/media/omap4iss/iss_video.c @@ -205,21 +205,21 @@ iss_video_remote_subdev(struct iss_video *video, u32 *pad) static struct iss_video * iss_video_far_end(struct iss_video *video) { - struct media_entity_graph graph; + struct media_graph graph; struct media_entity *entity = &video->video.entity; struct media_device *mdev = entity->graph_obj.mdev; struct iss_video *far_end = NULL; mutex_lock(&mdev->graph_mutex); - if (media_entity_graph_walk_init(&graph, mdev)) { + if (media_graph_walk_init(&graph, mdev)) { mutex_unlock(&mdev->graph_mutex); return NULL; } - media_entity_graph_walk_start(&graph, entity); + media_graph_walk_start(&graph, entity); - while ((entity = media_entity_graph_walk_next(&graph))) { + while ((entity = media_graph_walk_next(&graph))) { if (entity == &video->video.entity) continue; @@ -235,7 +235,7 @@ iss_video_far_end(struct iss_video *video) mutex_unlock(&mdev->graph_mutex); - media_entity_graph_walk_cleanup(&graph); + media_graph_walk_cleanup(&graph); return far_end; } @@ -854,7 +854,7 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) { struct iss_video_fh *vfh = to_iss_video_fh(fh); struct iss_video *video = video_drvdata(file); - struct media_entity_graph graph; + struct media_graph graph; struct media_entity *entity = &video->video.entity; enum iss_pipeline_state state; struct iss_pipeline *pipe; @@ -880,19 +880,19 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) if (ret) goto err_graph_walk_init; - ret = media_entity_graph_walk_init(&graph, entity->graph_obj.mdev); + ret = media_graph_walk_init(&graph, entity->graph_obj.mdev); if (ret) goto err_graph_walk_init; if (video->iss->pdata->set_constraints) video->iss->pdata->set_constraints(video->iss, true); - ret = media_entity_pipeline_start(entity, &pipe->pipe); + ret = media_pipeline_start(entity, &pipe->pipe); if (ret < 0) - goto err_media_entity_pipeline_start; + goto err_media_pipeline_start; - media_entity_graph_walk_start(&graph, entity); - while ((entity = media_entity_graph_walk_next(&graph))) + media_graph_walk_start(&graph, entity); + while ((entity = media_graph_walk_next(&graph))) media_entity_enum_set(&pipe->ent_enum, entity); /* Verify that the currently configured format matches the output of @@ -963,7 +963,7 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) spin_unlock_irqrestore(&video->qlock, flags); } - media_entity_graph_walk_cleanup(&graph); + media_graph_walk_cleanup(&graph); mutex_unlock(&video->stream_lock); @@ -972,13 +972,13 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) err_omap4iss_set_stream: vb2_streamoff(&vfh->queue, type); err_iss_video_check_format: - media_entity_pipeline_stop(&video->video.entity); -err_media_entity_pipeline_start: + media_pipeline_stop(&video->video.entity); +err_media_pipeline_start: if (video->iss->pdata->set_constraints) video->iss->pdata->set_constraints(video->iss, false); video->queue = NULL; - media_entity_graph_walk_cleanup(&graph); + media_graph_walk_cleanup(&graph); err_graph_walk_init: media_entity_enum_cleanup(&pipe->ent_enum); @@ -1026,7 +1026,7 @@ iss_video_streamoff(struct file *file, void *fh, enum v4l2_buf_type type) if (video->iss->pdata->set_constraints) video->iss->pdata->set_constraints(video->iss, false); - media_entity_pipeline_stop(&video->video.entity); + media_pipeline_stop(&video->video.entity); done: mutex_unlock(&video->stream_lock); |