Skip to contentSkip to conversation

staging: media: atomisp: Remove unused function

PATCH New Alex Dewar 1 participant 2 messages Oct 17, 2020

Subsystems (4)
lore
Share & tools
lore

Alex Dewar

author
#0 lore raw

PATCH 2/2 staging: media: atomisp: Remove unused function

The function ia_css_mipi_frame_specify() is not called from anywhere and the comment above its declaration states that it should be removed when there are no more users. So remove it.

---
 drivers/staging/media/atomisp/pci/ia_css_mipi.h | 17 -----------------
 drivers/staging/media/atomisp/pci/sh_css_mipi.c | 11 -----------
 2 files changed, 28 deletions(-)
drivers/staging/media/atomisp/pci/ia_css_mipi.h +0 -17
index 7b6d796d6ee0..9e50e1c619be 100644
@@ -25,23 +25,6 @@
 #include "ia_css_stream_format.h"
 #include "ia_css_input_port.h"
 
-/* Backward compatible for CSS API 2.0 only
- * TO BE REMOVED when all drivers move to CSS API 2.1.
- */
-/* @brief Specify a CSS MIPI frame buffer.
- *
- * @param[in]	size_mem_words	The frame size in memory words (32B).
- * @param[in]	contiguous	Allocate memory physically contiguously or not.
- * @return		The error code.
- *
- * \deprecated{Use ia_css_mipi_buffer_config instead.}
- *
- * Specifies a CSS MIPI frame buffer: size in memory words (32B).
- */
-int
-ia_css_mipi_frame_specify(const unsigned int	size_mem_words,
-			  const bool contiguous);
-
 /* @brief Register size of a CSS MIPI frame for check during capturing.
  *
  * @param[in]	port	CSI-2 port this check is registered.
drivers/staging/media/atomisp/pci/sh_css_mipi.c +0 -11
index d5ae7f0b5864..3f34cc81be87 100644
@@ -33,17 +33,6 @@
 static u32
 ref_count_mipi_allocation[N_CSI_PORTS]; /* Initialized in mipi_init */
 
-int
-ia_css_mipi_frame_specify(const unsigned int size_mem_words,
-			  const bool contiguous) {
-	int err = 0;
-
-	my_css.size_mem_words = size_mem_words;
-	(void)contiguous;
-
-	return err;
-}
-
 /*
  * Check if a source port or TPG/PRBS ID is valid
  */
Signature · 1 line
2.28.0
author
#1 lore raw

PATCH 1/2 staging: media: atomisp: Remove unnecessary if statement

The bodies of the if and else sections are the same, so just remove the check.

---
 .../staging/media/atomisp/pci/atomisp_cmd.c   | 27 +++++--------------
 1 file changed, 6 insertions(+), 21 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +6 -21
index 592ea990d4ca..92ddce409d04 100644
@@ -5407,27 +5407,12 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 		return -EINVAL;
 	}
 
-	if (asd->continuous_mode->val &&
-	    (configure_pp_input == atomisp_css_preview_configure_pp_input ||
-	     configure_pp_input == atomisp_css_video_configure_pp_input)) {
-		/* for isp 2.2, configure pp input is available for continuous
-		 * mode */
-		ret = configure_pp_input(asd, isp_sink_crop->width,
-					 isp_sink_crop->height);
-		if (ret) {
-			dev_err(isp->dev, "configure_pp_input %ux%u\n",
-				isp_sink_crop->width,
-				isp_sink_crop->height);
-			return -EINVAL;
-		}
-	} else {
-		ret = configure_pp_input(asd, isp_sink_crop->width,
-					 isp_sink_crop->height);
-		if (ret) {
-			dev_err(isp->dev, "configure_pp_input %ux%u\n",
-				isp_sink_crop->width, isp_sink_crop->height);
-			return -EINVAL;
-		}
+	ret = configure_pp_input(asd, isp_sink_crop->width, isp_sink_crop->height);
+	if (ret) {
+		dev_err(isp->dev, "configure_pp_input %ux%u\n",
+			isp_sink_crop->width,
+			isp_sink_crop->height);
+		return -EINVAL;
 	}
 	if (asd->copy_mode)
 		ret = atomisp_css_copy_get_output_frame_info(asd, stream_index,
Signature · 1 line
2.28.0