[PATCH v3.1 13/17] media: rkisp1: Compile debugfs support conditionally
Dafna Hirschfeld
dafna at fastmail.com
Mon Mar 21 21:12:57 PDT 2022
On 21.03.2022 14:44, Laurent Pinchart wrote:
> When CONFIG_DEBUGFS is disabled, there's no need to compile the debugfs
> support in. Make it conditional.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna at fastmail.com>
> ---
> Changes since v3:
>
> - Fix double mention of rkisp1-debug.o in Makefile
> ---
> .../media/platform/rockchip/rkisp1/Makefile | 18 ++++++++++--------
> .../platform/rockchip/rkisp1/rkisp1-common.h | 9 +++++++++
> 2 files changed, 19 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/platform/rockchip/rkisp1/Makefile b/drivers/media/platform/rockchip/rkisp1/Makefile
> index 1a39bdcc608e..f7543a82aa10 100644
> --- a/drivers/media/platform/rockchip/rkisp1/Makefile
> +++ b/drivers/media/platform/rockchip/rkisp1/Makefile
> @@ -1,11 +1,13 @@
> # SPDX-License-Identifier: GPL-2.0
>
> +rockchip-isp1-y := rkisp1-capture.o \
> + rkisp1-common.o \
> + rkisp1-dev.o \
> + rkisp1-isp.o \
> + rkisp1-resizer.o \
> + rkisp1-stats.o \
> + rkisp1-params.o
> +
> +rockchip-isp1-$(CONFIG_DEBUG_FS) += rkisp1-debug.o
> +
> obj-$(CONFIG_VIDEO_ROCKCHIP_ISP1) += rockchip-isp1.o
> -rockchip-isp1-objs += rkisp1-capture.o \
> - rkisp1-common.o \
> - rkisp1-debug.o \
> - rkisp1-dev.o \
> - rkisp1-isp.o \
> - rkisp1-resizer.o \
> - rkisp1-stats.o \
> - rkisp1-params.o
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
> index 07a92ed8bdc8..a7ffe2830fa8 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
> @@ -518,7 +518,16 @@ void rkisp1_stats_unregister(struct rkisp1_device *rkisp1);
> int rkisp1_params_register(struct rkisp1_device *rkisp1);
> void rkisp1_params_unregister(struct rkisp1_device *rkisp1);
>
> +#if IS_ENABLED(CONFIG_DEBUG_FS)
> void rkisp1_debug_init(struct rkisp1_device *rkisp1);
> void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1);
> +#else
> +static inline void rkisp1_debug_init(struct rkisp1_device *rkisp1)
> +{
> +}
> +static inline void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1)
> +{
> +}
> +#endif
>
> #endif /* _RKISP1_COMMON_H */
> --
> Regards,
>
> Laurent Pinchart
>
More information about the Linux-rockchip
mailing list