Commit b2e44430 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

media: mc-entity: Rename media_entity_remote_pad() to media_pad_remote_pad_first()



The media_entity_remote_pad() is misnamed, as it operates on a pad and
not an entity. Rename it to media_pad_remote_pad_first() to clarify its
behaviour.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 57cb848f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -186,8 +186,7 @@ is required and the graph structure can be freed normally.

Helper functions can be used to find a link between two given pads, or a pad
connected to another pad through an enabled link
:c:func:`media_entity_find_link()` and
:c:func:`media_entity_remote_pad()`.
:c:func:`media_entity_find_link()` and :c:func:`media_pad_remote_pad_first()`.

Use count and power handling
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+1 −1
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ int adv748x_write_block(struct adv748x_state *state, int client_page,

static inline struct v4l2_subdev *adv748x_get_remote_sd(struct media_pad *pad)
{
	pad = media_entity_remote_pad(pad);
	pad = media_pad_remote_pad_first(pad);
	if (!pad)
		return NULL;

+1 −1
Original line number Diff line number Diff line
@@ -1285,7 +1285,7 @@ static int tvp5150_disable_all_input_links(struct tvp5150 *decoder)
	int err;

	for (i = 0; i < TVP5150_NUM_PADS - 1; i++) {
		connector_pad = media_entity_remote_pad(&decoder->pads[i]);
		connector_pad = media_pad_remote_pad_first(&decoder->pads[i]);
		if (!connector_pad)
			continue;

+2 −2
Original line number Diff line number Diff line
@@ -901,7 +901,7 @@ media_entity_find_link(struct media_pad *source, struct media_pad *sink)
}
EXPORT_SYMBOL_GPL(media_entity_find_link);

struct media_pad *media_entity_remote_pad(const struct media_pad *pad)
struct media_pad *media_pad_remote_pad_first(const struct media_pad *pad)
{
	struct media_link *link;

@@ -919,7 +919,7 @@ struct media_pad *media_entity_remote_pad(const struct media_pad *pad)
	return NULL;

}
EXPORT_SYMBOL_GPL(media_entity_remote_pad);
EXPORT_SYMBOL_GPL(media_pad_remote_pad_first);

static void media_interface_init(struct media_device *mdev,
				 struct media_interface *intf,
+1 −1
Original line number Diff line number Diff line
@@ -1323,7 +1323,7 @@ static int cio2_video_link_validate(struct media_link *link)
	struct v4l2_subdev_format source_fmt;
	int ret;

	if (!media_entity_remote_pad(entity->pads)) {
	if (!media_pad_remote_pad_first(entity->pads)) {
		dev_info(dev, "video node %s pad not connected\n", vd->name);
		return -ENOTCONN;
	}
Loading