From: Hans Verkuil <hverkuil@xs4all.nl>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
linux-media@vger.kernel.org
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Prabhakar Lad <prabhakar.csengg@gmail.com>
Subject: Re: [PATCH 4/8] media: Rename is_media_entity_v4l2_io to is_media_entity_v4l2_video_device
Date: Thu, 3 Mar 2016 14:33:19 +0100 [thread overview]
Message-ID: <56D83D1F.6020309@xs4all.nl> (raw)
In-Reply-To: <1456844246-18778-5-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
On 03/01/16 15:57, Laurent Pinchart wrote:
> All users of is_media_entity_v4l2_io() (the exynos4-is, omap3isp,
> davince_vpfe and omap4iss drivers) use the function to check whether
> entities are video_device instances, either to ensure they can cast the
> entity to a struct video_device, or to count the number of video nodes
> users.
>
> The purpose of the function is thus to identify whether the media entity
> instance is an instance of the video_device object, not to check whether
> it can perform I/O. Rename it accordingly, we will introduce a more
> specific is_media_entity_v4l2_io() check when needed.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Thanks for the much clearer commit text, that makes it much more understandable
what is going on here.
Hans
> ---
> drivers/media/platform/exynos4-is/media-dev.c | 4 ++--
> drivers/media/platform/omap3isp/isp.c | 2 +-
> drivers/media/platform/omap3isp/ispvideo.c | 2 +-
> drivers/staging/media/davinci_vpfe/vpfe_video.c | 2 +-
> drivers/staging/media/omap4iss/iss.c | 2 +-
> drivers/staging/media/omap4iss/iss_video.c | 2 +-
> include/media/media-entity.h | 4 ++--
> 7 files changed, 9 insertions(+), 9 deletions(-)
>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
>
> diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
> index feb521f28e14..9a377d9dd58a 100644
> --- a/drivers/media/platform/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/exynos4-is/media-dev.c
> @@ -1130,7 +1130,7 @@ static int __fimc_md_modify_pipelines(struct media_entity *entity, bool enable,
> media_entity_graph_walk_start(graph, entity);
>
> while ((entity = media_entity_graph_walk_next(graph))) {
> - if (!is_media_entity_v4l2_io(entity))
> + if (!is_media_entity_v4l2_video_device(entity))
> continue;
>
> ret = __fimc_md_modify_pipeline(entity, enable);
> @@ -1145,7 +1145,7 @@ err:
> media_entity_graph_walk_start(graph, entity_err);
>
> while ((entity_err = media_entity_graph_walk_next(graph))) {
> - if (!is_media_entity_v4l2_io(entity_err))
> + if (!is_media_entity_v4l2_video_device(entity_err))
> continue;
>
> __fimc_md_modify_pipeline(entity_err, !enable);
> diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
> index f9e5245f26ac..12f07e409f0b 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -691,7 +691,7 @@ static int isp_pipeline_pm_use_count(struct media_entity *entity,
> media_entity_graph_walk_start(graph, entity);
>
> while ((entity = media_entity_graph_walk_next(graph))) {
> - if (is_media_entity_v4l2_io(entity))
> + if (is_media_entity_v4l2_video_device(entity))
> use += entity->use_count;
> }
>
> diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c
> index 2aff755ff77c..c4734a5b8886 100644
> --- a/drivers/media/platform/omap3isp/ispvideo.c
> +++ b/drivers/media/platform/omap3isp/ispvideo.c
> @@ -249,7 +249,7 @@ static int isp_video_get_graph_data(struct isp_video *video,
> if (entity == &video->video.entity)
> continue;
>
> - if (!is_media_entity_v4l2_io(entity))
> + if (!is_media_entity_v4l2_video_device(entity))
> continue;
>
> __video = to_isp_video(media_entity_to_video_device(entity));
> diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c
> index db49af90217e..7d8fa34f31f3 100644
> --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c
> +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c
> @@ -154,7 +154,7 @@ static int vpfe_prepare_pipeline(struct vpfe_video_device *video)
> while ((entity = media_entity_graph_walk_next(&graph))) {
> if (entity == &video->video_dev.entity)
> continue;
> - if (!is_media_entity_v4l2_io(entity))
> + if (!is_media_entity_v4l2_video_device(entity))
> continue;
> far_end = to_vpfe_video(media_entity_to_video_device(entity));
> if (far_end->type == V4L2_BUF_TYPE_VIDEO_OUTPUT)
> diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c
> index 30b473cfb020..d41231521775 100644
> --- a/drivers/staging/media/omap4iss/iss.c
> +++ b/drivers/staging/media/omap4iss/iss.c
> @@ -397,7 +397,7 @@ static int iss_pipeline_pm_use_count(struct media_entity *entity,
> media_entity_graph_walk_start(graph, entity);
>
> while ((entity = media_entity_graph_walk_next(graph))) {
> - if (is_media_entity_v4l2_io(entity))
> + if (is_media_entity_v4l2_video_device(entity))
> use += entity->use_count;
> }
>
> diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c
> index 058233a9de67..002d81d4ee45 100644
> --- a/drivers/staging/media/omap4iss/iss_video.c
> +++ b/drivers/staging/media/omap4iss/iss_video.c
> @@ -221,7 +221,7 @@ iss_video_far_end(struct iss_video *video)
> if (entity == &video->video.entity)
> continue;
>
> - if (!is_media_entity_v4l2_io(entity))
> + if (!is_media_entity_v4l2_video_device(entity))
> continue;
>
> far_end = to_iss_video(media_entity_to_video_device(entity));
> diff --git a/include/media/media-entity.h b/include/media/media-entity.h
> index cbd37530f6b8..e5108f052fe2 100644
> --- a/include/media/media-entity.h
> +++ b/include/media/media-entity.h
> @@ -356,14 +356,14 @@ static inline u32 media_gobj_gen_id(enum media_gobj_type type, u64 local_id)
> }
>
> /**
> - * is_media_entity_v4l2_io() - Check if the entity is a video_device
> + * is_media_entity_v4l2_video_device() - Check if the entity is a video_device
> * @entity: pointer to entity
> *
> * Return: true if the entity is an instance of a video_device object and can
> * safely be cast to a struct video_device using the container_of() macro, or
> * false otherwise.
> */
> -static inline bool is_media_entity_v4l2_io(struct media_entity *entity)
> +static inline bool is_media_entity_v4l2_video_device(struct media_entity *entity)
> {
> return entity && entity->type == MEDIA_ENTITY_TYPE_VIDEO_DEVICE;
> }
>
next prev parent reply other threads:[~2016-03-03 13:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 14:57 [PATCH v3 0/8] media: Add entity types Laurent Pinchart
2016-03-01 14:57 ` [PATCH 1/8] v4l: vsp1: Check if an entity is a subdev with the right function Laurent Pinchart
2016-03-01 14:57 ` [PATCH 2/8] v4l: exynos4-is: Drop unneeded check when setting up fimc-lite links Laurent Pinchart
2016-03-01 14:57 ` [PATCH 3/8] media: Add type field to struct media_entity Laurent Pinchart
2016-03-03 13:32 ` Hans Verkuil
2016-03-01 14:57 ` [PATCH 4/8] media: Rename is_media_entity_v4l2_io to is_media_entity_v4l2_video_device Laurent Pinchart
2016-03-03 13:33 ` Hans Verkuil [this message]
2016-03-04 20:05 ` Laurent Pinchart
2016-03-07 10:23 ` Lad, Prabhakar
2016-03-01 14:57 ` [PATCH 5/8] v4l2: add device_caps to struct video_device Laurent Pinchart
2016-03-01 14:57 ` [PATCH 6/8] v4l2-pci-skeleton.c: fill in device_caps in video_device Laurent Pinchart
2016-03-01 14:57 ` [PATCH 7/8] vivid: set " Laurent Pinchart
2016-03-01 14:57 ` [PATCH 8/8] media-entity.h: Add is_media_entity_v4l2_io() Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56D83D1F.6020309@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=prabhakar.csengg@gmail.com \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.