Skip to contentSkip to conversation

media: stm32: dcmi: Drop always NULL sd_state from dcmi_pipeline_s_fmt()

PATCH In review Marek Vasut 2 participants 2 messages Jun 18, 2022 – Jun 27, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: stm32: dcmi: Drop always NULL sd_state from dcmi_pipeline_s_fmt()

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

Cc Alain Volmat <[email protected]>
Cc Alexandre Torgue <[email protected]>
Cc Amelie DELAUNAY <[email protected]>
Cc Hugues FRUCHET <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Philippe CORNU <[email protected]>
---
 drivers/media/platform/st/stm32/stm32-dcmi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/media/platform/st/stm32/stm32-dcmi.c +2 -3
index 56f4e04bc7c49..ec54b5ecfd544 100644
@@ -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;
 
Signature · 1 line
2.35.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Marek,

Thanks for the patch.

BR,
Hugues.

Quoted 45 lines · Marek Vasut

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

Cc Alain Volmat <[email protected]>
Cc Alexandre Torgue <[email protected]>
Cc Amelie DELAUNAY <[email protected]>
Cc Hugues FRUCHET <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Philippe CORNU <[email protected]>
---
  drivers/media/platform/st/stm32/stm32-dcmi.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
drivers/media/platform/st/stm32/stm32-dcmi.c +2 -3
index 56f4e04bc7c49..ec54b5ecfd544 100644
@@ -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;