Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bddf1b3 authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Mauro Carvalho Chehab
Browse files

[media] media: Rename media_entity_remote_source to media_entity_remote_pad



Function media_entity_remote_source actually returns the remote pad to
the given one, regardless if this is the source or the sink pad.
Name media_entity_remote_pad is more adequate for this function.

Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
Acked-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent d716ef46
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -265,7 +265,7 @@ connected to another pad through an enabled link
	media_entity_find_link(struct media_pad *source,
			       struct media_pad *sink);

	media_entity_remote_source(struct media_pad *pad);
	media_entity_remote_pad(struct media_pad *pad);

Refer to the kerneldoc documentation for more information.

+6 −7
Original line number Diff line number Diff line
@@ -560,17 +560,16 @@ media_entity_find_link(struct media_pad *source, struct media_pad *sink)
EXPORT_SYMBOL_GPL(media_entity_find_link);

/**
 * media_entity_remote_source - Find the source pad at the remote end of a link
 * @pad: Sink pad at the local end of the link
 * media_entity_remote_pad - Find the pad at the remote end of a link
 * @pad: Pad at the local end of the link
 *
 * Search for a remote source pad connected to the given sink pad by iterating
 * over all links originating or terminating at that pad until an enabled link
 * is found.
 * Search for a remote pad connected to the given pad by iterating over all
 * links originating or terminating at that pad until an enabled link is found.
 *
 * Return a pointer to the pad at the remote end of the first found enabled
 * link, or NULL if no enabled link has been found.
 */
struct media_pad *media_entity_remote_source(struct media_pad *pad)
struct media_pad *media_entity_remote_pad(struct media_pad *pad)
{
	unsigned int i;

@@ -590,4 +589,4 @@ struct media_pad *media_entity_remote_source(struct media_pad *pad)
	return NULL;

}
EXPORT_SYMBOL_GPL(media_entity_remote_source);
EXPORT_SYMBOL_GPL(media_entity_remote_pad);
+3 −3
Original line number Diff line number Diff line
@@ -773,7 +773,7 @@ static struct media_entity *fimc_pipeline_get_head(struct media_entity *me)
	struct media_pad *pad = &me->pads[0];

	while (!(pad->flags & MEDIA_PAD_FL_SOURCE)) {
		pad = media_entity_remote_source(pad);
		pad = media_entity_remote_pad(pad);
		if (!pad)
			break;
		me = pad->entity;
@@ -845,7 +845,7 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx,
					return ret;
			}

			pad = media_entity_remote_source(&me->pads[sfmt.pad]);
			pad = media_entity_remote_pad(&me->pads[sfmt.pad]);
			if (!pad)
				return -EINVAL;
			me = pad->entity;
@@ -1146,7 +1146,7 @@ static int fimc_pipeline_validate(struct fimc_dev *fimc)

			if (p->flags & MEDIA_PAD_FL_SINK) {
				sink_pad = p;
				src_pad = media_entity_remote_source(sink_pad);
				src_pad = media_entity_remote_pad(sink_pad);
				if (src_pad)
					break;
			}
+2 −2
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ static struct v4l2_subdev *__find_remote_sensor(struct media_entity *me)

	while (pad->flags & MEDIA_PAD_FL_SINK) {
		/* source pad */
		pad = media_entity_remote_source(pad);
		pad = media_entity_remote_pad(pad);
		if (pad == NULL ||
		    media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV)
			break;
@@ -786,7 +786,7 @@ static int fimc_pipeline_validate(struct fimc_lite *fimc)
				return -EPIPE;
		}
		/* Retrieve format at the source pad */
		pad = media_entity_remote_source(pad);
		pad = media_entity_remote_pad(pad);
		if (pad == NULL ||
		    media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV)
			break;
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ static void fimc_pipeline_prepare(struct fimc_pipeline *p,
			struct media_pad *spad = &me->pads[i];
			if (!(spad->flags & MEDIA_PAD_FL_SINK))
				continue;
			pad = media_entity_remote_source(spad);
			pad = media_entity_remote_pad(spad);
			if (pad)
				break;
		}
Loading