linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: stm32: dcmi: Drop always NULL sd_state from dcmi_pipeline_s_fmt()
@ 2022-06-18 22:23 Marek Vasut
  2022-06-27  9:40 ` Hugues FRUCHET
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2022-06-18 22:23 UTC (permalink / raw)
  To: linux-media
  Cc: Marek Vasut, Alain Volmat, Alexandre Torgue, Amelie DELAUNAY,
	Hugues FRUCHET, Laurent Pinchart, Philippe CORNU, linux-stm32,
	linux-arm-kernel

The second argument is always NULL, stop passing it to the function.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alain Volmat <alain.volmat@foss.st.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Cc: Hugues FRUCHET <hugues.fruchet@foss.st.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Philippe CORNU <philippe.cornu@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/media/platform/st/stm32/stm32-dcmi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c
index 56f4e04bc7c49..ec54b5ecfd544 100644
--- a/drivers/media/platform/st/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/st/stm32/stm32-dcmi.c
@@ -622,7 +622,6 @@ static struct media_entity *dcmi_find_source(struct stm32_dcmi *dcmi)
 }
 
 static int dcmi_pipeline_s_fmt(struct stm32_dcmi *dcmi,
-			       struct v4l2_subdev_state *sd_state,
 			       struct v4l2_subdev_format *format)
 {
 	struct media_entity *entity = &dcmi->source->entity;
@@ -664,7 +663,7 @@ static int dcmi_pipeline_s_fmt(struct stm32_dcmi *dcmi,
 			format->format.width, format->format.height);
 
 		fmt.pad = pad->index;
-		ret = v4l2_subdev_call(subdev, pad, set_fmt, sd_state, &fmt);
+		ret = v4l2_subdev_call(subdev, pad, set_fmt, NULL, &fmt);
 		if (ret < 0) {
 			dev_err(dcmi->dev, "%s: Failed to set format 0x%x %ux%u on \"%s\":%d pad (%d)\n",
 				__func__, format->format.code,
@@ -1115,7 +1114,7 @@ static int dcmi_set_fmt(struct stm32_dcmi *dcmi, struct v4l2_format *f)
 	mf->width = sd_framesize.width;
 	mf->height = sd_framesize.height;
 
-	ret = dcmi_pipeline_s_fmt(dcmi, NULL, &format);
+	ret = dcmi_pipeline_s_fmt(dcmi, &format);
 	if (ret < 0)
 		return ret;
 
-- 
2.35.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: stm32: dcmi: Drop always NULL sd_state from dcmi_pipeline_s_fmt()
  2022-06-18 22:23 [PATCH] media: stm32: dcmi: Drop always NULL sd_state from dcmi_pipeline_s_fmt() Marek Vasut
@ 2022-06-27  9:40 ` Hugues FRUCHET
  0 siblings, 0 replies; 2+ messages in thread
From: Hugues FRUCHET @ 2022-06-27  9:40 UTC (permalink / raw)
  To: Marek Vasut, linux-media
  Cc: Alain Volmat, Alexandre Torgue, Amelie DELAUNAY,
	Laurent Pinchart, Philippe CORNU, linux-stm32, linux-arm-kernel

Hi Marek,

Thanks for the patch.

Acked-by: Hugues Fruchet <hugues.fruchet@st.com>

BR,
Hugues.

On 6/19/22 00:23, Marek Vasut wrote:
> The second argument is always NULL, stop passing it to the function.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alain Volmat <alain.volmat@foss.st.com>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
> Cc: Hugues FRUCHET <hugues.fruchet@foss.st.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Philippe CORNU <philippe.cornu@foss.st.com>
> Cc: linux-stm32@st-md-mailman.stormreply.com
> Cc: linux-arm-kernel@lists.infradead.org
> ---
>   drivers/media/platform/st/stm32/stm32-dcmi.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c
> index 56f4e04bc7c49..ec54b5ecfd544 100644
> --- a/drivers/media/platform/st/stm32/stm32-dcmi.c
> +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c
> @@ -622,7 +622,6 @@ static struct media_entity *dcmi_find_source(struct stm32_dcmi *dcmi)
>   }
>   
>   static int dcmi_pipeline_s_fmt(struct stm32_dcmi *dcmi,
> -			       struct v4l2_subdev_state *sd_state,
>   			       struct v4l2_subdev_format *format)
>   {
>   	struct media_entity *entity = &dcmi->source->entity;
> @@ -664,7 +663,7 @@ static int dcmi_pipeline_s_fmt(struct stm32_dcmi *dcmi,
>   			format->format.width, format->format.height);
>   
>   		fmt.pad = pad->index;
> -		ret = v4l2_subdev_call(subdev, pad, set_fmt, sd_state, &fmt);
> +		ret = v4l2_subdev_call(subdev, pad, set_fmt, NULL, &fmt);
>   		if (ret < 0) {
>   			dev_err(dcmi->dev, "%s: Failed to set format 0x%x %ux%u on \"%s\":%d pad (%d)\n",
>   				__func__, format->format.code,
> @@ -1115,7 +1114,7 @@ static int dcmi_set_fmt(struct stm32_dcmi *dcmi, struct v4l2_format *f)
>   	mf->width = sd_framesize.width;
>   	mf->height = sd_framesize.height;
>   
> -	ret = dcmi_pipeline_s_fmt(dcmi, NULL, &format);
> +	ret = dcmi_pipeline_s_fmt(dcmi, &format);
>   	if (ret < 0)
>   		return ret;
>   

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-27  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-18 22:23 [PATCH] media: stm32: dcmi: Drop always NULL sd_state from dcmi_pipeline_s_fmt() Marek Vasut
2022-06-27  9:40 ` Hugues FRUCHET

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).