media: atomisp: make util.c work with ISP2401 runtime detection
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 28 Apr 2020 07:30:26 +0000 (09:30 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 10:32:17 +0000 (12:32 +0200)
Don't hide those small functions behind ifdefs.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/src/util.c

index b09a0a009c08774dc366484a2bced9777be11c20..75333166ed9b3d2e9a9c82049f2ad6dff71702fa 100644 (file)
@@ -74,7 +74,7 @@ enum ia_css_err ia_css_util_check_res(
     unsigned int width,
     unsigned int height);
 
-#ifdef ISP2401
+/* ISP2401 */
 /* @brief compare resolutions (less or equal)
  *
  * @param[in] a resolution
@@ -87,6 +87,7 @@ bool ia_css_util_res_leq(
     struct ia_css_resolution a,
     struct ia_css_resolution b);
 
+/* ISP2401 */
 /**
  * @brief Check if resolution is zero
  *
@@ -97,6 +98,7 @@ bool ia_css_util_res_leq(
 bool ia_css_util_resolution_is_zero(
     const struct ia_css_resolution resolution);
 
+/* ISP2401 */
 /**
  * @brief Check if resolution is even
  *
@@ -107,7 +109,6 @@ bool ia_css_util_resolution_is_zero(
 bool ia_css_util_resolution_is_even(
     const struct ia_css_resolution resolution);
 
-#endif
 /* @brief check width and height
  *
  * @param[in] stream_format
index a44cd35acd0f3358eecb1099441e2005aa2e48d5..f14776f09bbbe51f0a4871495f3fb43210d64ef9 100644 (file)
@@ -158,23 +158,24 @@ enum ia_css_err ia_css_util_check_res(unsigned int width, unsigned int height)
        return IA_CSS_SUCCESS;
 }
 
-#ifdef ISP2401
+/* ISP2401 */
 bool ia_css_util_res_leq(struct ia_css_resolution a, struct ia_css_resolution b)
 {
        return a.width <= b.width && a.height <= b.height;
 }
 
+/* ISP2401 */
 bool ia_css_util_resolution_is_zero(const struct ia_css_resolution resolution)
 {
        return (resolution.width == 0) || (resolution.height == 0);
 }
 
+/* ISP2401 */
 bool ia_css_util_resolution_is_even(const struct ia_css_resolution resolution)
 {
        return IS_EVEN(resolution.height) && IS_EVEN(resolution.width);
 }
 
-#endif
 bool ia_css_util_is_input_format_raw(enum atomisp_input_format format)
 {
        return ((format == ATOMISP_INPUT_FORMAT_RAW_6) ||