All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Cc: Jacopo Mondi <jacopo@jmondi.org>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Subject: [PATCH 1/2] media: subdev: Rename v4l2_state_get_stream_format() with subdev prefix
Date: Thu, 16 Dec 2021 15:15:09 +0200	[thread overview]
Message-ID: <20211216131510.12308-2-laurent.pinchart+renesas@ideasonboard.com> (raw)
In-Reply-To: <20211216131510.12308-1-laurent.pinchart+renesas@ideasonboard.com>

The v4l2_state_get_stream_format() function operates on a subdev state,
rename it accordingly to v4l2_subdev_state_get_stream_format().

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/media/v4l2-core/v4l2-subdev.c | 14 ++++++++------
 include/media/v4l2-subdev.h           |  6 +++---
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index dca2bea180ec..73ee7f01838f 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -179,7 +179,7 @@ static int check_state_pad_stream(struct v4l2_subdev *sd,
 	 */
 	v4l2_subdev_lock_state(state);
 
-	fmt = v4l2_state_get_stream_format(state, pad, stream);
+	fmt = v4l2_subdev_state_get_stream_format(state, pad, stream);
 
 	v4l2_subdev_unlock_state(state);
 
@@ -1492,8 +1492,8 @@ int v4l2_subdev_set_routing_with_fmt(struct v4l2_subdev *sd,
 EXPORT_SYMBOL_GPL(v4l2_subdev_set_routing_with_fmt);
 
 struct v4l2_mbus_framefmt *
-v4l2_state_get_stream_format(struct v4l2_subdev_state *state, unsigned int pad,
-			     u32 stream)
+v4l2_subdev_state_get_stream_format(struct v4l2_subdev_state *state,
+				    unsigned int pad, u32 stream)
 {
 	struct v4l2_subdev_stream_configs *stream_configs;
 	unsigned int i;
@@ -1510,7 +1510,7 @@ v4l2_state_get_stream_format(struct v4l2_subdev_state *state, unsigned int pad,
 
 	return NULL;
 }
-EXPORT_SYMBOL_GPL(v4l2_state_get_stream_format);
+EXPORT_SYMBOL_GPL(v4l2_subdev_state_get_stream_format);
 
 int v4l2_subdev_routing_find_opposite_end(const struct v4l2_subdev_krouting *routing,
 					  u32 pad, u32 stream, u32 *other_pad,
@@ -1555,7 +1555,8 @@ v4l2_subdev_state_get_opposite_stream_format(struct v4l2_subdev_state *state,
 	if (ret)
 		return NULL;
 
-	return v4l2_state_get_stream_format(state, other_pad, other_stream);
+	return v4l2_subdev_state_get_stream_format(state, other_pad,
+						   other_stream);
 }
 EXPORT_SYMBOL_GPL(v4l2_subdev_state_get_opposite_stream_format);
 
@@ -1566,7 +1567,8 @@ int v4l2_subdev_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_state *state,
 
 	v4l2_subdev_lock_state(state);
 
-	fmt = v4l2_state_get_stream_format(state, format->pad, format->stream);
+	fmt = v4l2_subdev_state_get_stream_format(state, format->pad,
+						  format->stream);
 	if (!fmt) {
 		v4l2_subdev_unlock_state(state);
 		return -EINVAL;
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 9754913b34f8..aff1fb3a30d5 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -1505,7 +1505,7 @@ int v4l2_subdev_set_routing_with_fmt(struct v4l2_subdev *sd,
 				     const struct v4l2_mbus_framefmt *fmt);
 
 /**
- * v4l2_state_get_stream_format() - Get pointer to a stream format
+ * v4l2_subdev_state_get_stream_format() - Get pointer to a stream format
  * @state: subdevice state
  * @pad: pad id
  * @stream: stream id
@@ -1516,8 +1516,8 @@ int v4l2_subdev_set_routing_with_fmt(struct v4l2_subdev *sd,
  * If the state does not contain the given pad + stream, NULL is returned.
  */
 struct v4l2_mbus_framefmt *
-v4l2_state_get_stream_format(struct v4l2_subdev_state *state, unsigned int pad,
-			     u32 stream);
+v4l2_subdev_state_get_stream_format(struct v4l2_subdev_state *state,
+				    unsigned int pad, u32 stream);
 
 /**
  * v4l2_subdev_routing_find_opposite_end() - Find the opposite stream
-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2021-12-16 13:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 13:15 [PATCH 0/2] v4l: Proposed improvements for muxed streams v10 Laurent Pinchart
2021-12-16 13:15 ` Laurent Pinchart [this message]
2021-12-17  9:17   ` [PATCH 1/2] media: subdev: Rename v4l2_state_get_stream_format() with subdev prefix Jacopo Mondi
2021-12-16 13:15 ` [PATCH 2/2] media: subdev: Extend routing validation helper Laurent Pinchart
2021-12-17 10:08   ` Jacopo Mondi

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=20211216131510.12308-2-laurent.pinchart+renesas@ideasonboard.com \
    --to=laurent.pinchart+renesas@ideasonboard.com \
    --cc=jacopo@jmondi.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=tomi.valkeinen@ideasonboard.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.