From patchwork Sun Feb 27 16:01:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 546558 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C79F7C4332F for ; Sun, 27 Feb 2022 16:01:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231590AbiB0QC0 (ORCPT ); Sun, 27 Feb 2022 11:02:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231582AbiB0QCZ (ORCPT ); Sun, 27 Feb 2022 11:02:25 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21FED5D1AB for ; Sun, 27 Feb 2022 08:01:49 -0800 (PST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EFAD0478; Sun, 27 Feb 2022 17:01:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1645977699; bh=VF2QkB11cwL7iYtqrOnq4BbeLJk7oZSEjWPH0fTt6tI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tiuMMCbbnChjPei5qGi0PIt18Da74Jc7IQgZh2qx9R4nSnaz6MLd/tJmIBBkWT7XJ apYvar9tZ6AocAl2SJ73TR4+ZPPIGu8I5KIiq+/wjZASH417mrjdQNEJN2lawpTzEw aJUyGWvRAVy7hsSHeAXm8L1UdS1g/Kmm6gTT5XLo= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Dafna Hirschfeld , Heiko Stuebner , Paul Elder , Tomasz Figa , linux-rockchip@lists.infradead.org Subject: [PATCH 12/16] media: rkisp1: Compile debugfs support conditionally Date: Sun, 27 Feb 2022 18:01:12 +0200 Message-Id: <20220227160116.18556-13-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220227160116.18556-1-laurent.pinchart@ideasonboard.com> References: <20220227160116.18556-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org When CONFIG_DEBUGFS is disabled, there's no need to compile the debugfs support in. Make it conditional. Signed-off-by: Laurent Pinchart Reported-by: kernel test robot --- .../media/platform/rockchip/rkisp1/Makefile | 19 +++++++++++-------- .../platform/rockchip/rkisp1/rkisp1-common.h | 9 +++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/Makefile b/drivers/media/platform/rockchip/rkisp1/Makefile index 1a39bdcc608e..c39ab7010c66 100644 --- a/drivers/media/platform/rockchip/rkisp1/Makefile +++ b/drivers/media/platform/rockchip/rkisp1/Makefile @@ -1,11 +1,14 @@ # SPDX-License-Identifier: GPL-2.0 +rockchip-isp1-y := rkisp1-capture.o \ + rkisp1-common.o \ + rkisp1-debug.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 b860eac9a981..fa31b343d1d2 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 */