[2/3] media: subdev: Constify v4l2_subdev_set_routing_with_fmt() param

Message ID 20230619112707.239565-2-tomi.valkeinen@ideasonboard.com
State New
Headers
Series [1/3] media: subdev: Drop implicit zeroing of stream field |

Commit Message

Tomi Valkeinen June 19, 2023, 11:27 a.m. UTC
  The routing parameter of v4l2_subdev_set_routing_with_fmt() is missing
'const'. Add it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
 drivers/media/v4l2-core/v4l2-subdev.c | 2 +-
 include/media/v4l2-subdev.h           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Jacopo Mondi July 17, 2023, 2:12 p.m. UTC | #1
Hi Tomi

On Mon, Jun 19, 2023 at 02:27:06PM +0300, Tomi Valkeinen wrote:
> The routing parameter of v4l2_subdev_set_routing_with_fmt() is missing
> 'const'. Add it.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

> ---
>  drivers/media/v4l2-core/v4l2-subdev.c | 2 +-
>  include/media/v4l2-subdev.h           | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
> index c1ac6d7a63d2..73f716a42569 100644
> --- a/drivers/media/v4l2-core/v4l2-subdev.c
> +++ b/drivers/media/v4l2-core/v4l2-subdev.c
> @@ -1590,7 +1590,7 @@ EXPORT_SYMBOL_GPL(__v4l2_subdev_next_active_route);
>
>  int v4l2_subdev_set_routing_with_fmt(struct v4l2_subdev *sd,
>  				     struct v4l2_subdev_state *state,
> -				     struct v4l2_subdev_krouting *routing,
> +				     const struct v4l2_subdev_krouting *routing,
>  				     const struct v4l2_mbus_framefmt *fmt)
>  {
>  	struct v4l2_subdev_stream_configs *stream_configs;
> diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
> index b325df0d54d6..ca0bacb88537 100644
> --- a/include/media/v4l2-subdev.h
> +++ b/include/media/v4l2-subdev.h
> @@ -1532,7 +1532,7 @@ __v4l2_subdev_next_active_route(const struct v4l2_subdev_krouting *routing,
>   */
>  int v4l2_subdev_set_routing_with_fmt(struct v4l2_subdev *sd,
>  				     struct v4l2_subdev_state *state,
> -				     struct v4l2_subdev_krouting *routing,
> +				     const struct v4l2_subdev_krouting *routing,
>  				     const struct v4l2_mbus_framefmt *fmt);
>
>  /**
> --
> 2.34.1
>
  

Patch

diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index c1ac6d7a63d2..73f716a42569 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -1590,7 +1590,7 @@  EXPORT_SYMBOL_GPL(__v4l2_subdev_next_active_route);
 
 int v4l2_subdev_set_routing_with_fmt(struct v4l2_subdev *sd,
 				     struct v4l2_subdev_state *state,
-				     struct v4l2_subdev_krouting *routing,
+				     const struct v4l2_subdev_krouting *routing,
 				     const struct v4l2_mbus_framefmt *fmt)
 {
 	struct v4l2_subdev_stream_configs *stream_configs;
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index b325df0d54d6..ca0bacb88537 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -1532,7 +1532,7 @@  __v4l2_subdev_next_active_route(const struct v4l2_subdev_krouting *routing,
  */
 int v4l2_subdev_set_routing_with_fmt(struct v4l2_subdev *sd,
 				     struct v4l2_subdev_state *state,
-				     struct v4l2_subdev_krouting *routing,
+				     const struct v4l2_subdev_krouting *routing,
 				     const struct v4l2_mbus_framefmt *fmt);
 
 /**