From df90644e8fb5eac1f18a8f73683d7e476364bf59 Mon Sep 17 00:00:00 2001 From: Finley Xiao Date: Tue, 15 Sep 2020 15:48:45 +0800 Subject: [PATCH] clk: rockchip: Disable boost summary when build as module In order to fix the following error when enable DEBUG_FS. drivers/clk/rockchip/clk-pll.c:1643:1: warning: data definition has no type or storage class error, forbidden warning:clk-pll.c:1643 late_initcall(boost_debug_init); ^~~~~~~~~~~~~ drivers/clk/rockchip/clk-pll.c:1643:1: error: type defaults to 'int' in declaration of 'late_initcall' [-Werror=implicit-int] drivers/clk/rockchip/clk-pll.c:1643:1: warning: parameter names (without types) in function declaration error, forbidden warning:clk-pll.c:1643 drivers/clk/rockchip/clk-pll.c:1623:19: warning: 'boost_debug_init' defined but not used [-Wunused-function] error, forbidden warning:clk-pll.c:1623 static int __init boost_debug_init(void) ^~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors scripts/Makefile.build:333: recipe for target 'drivers/clk/rockchip/clk-pll.o' failed make[4]: *** [drivers/clk/rockchip/clk-pll.o] Error 1 Signed-off-by: Finley Xiao Change-Id: I6aa341ea05925f6c05285329fd56b7c1e7f2307b Signed-off-by: Elaine Zhang --- drivers/clk/rockchip/clk-pll.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c index e75003666175..f4946461609d 100644 --- a/drivers/clk/rockchip/clk-pll.c +++ b/drivers/clk/rockchip/clk-pll.c @@ -1600,6 +1600,7 @@ void rockchip_boost_add_core_div(struct clk_hw *hw, unsigned long prate) #ifdef CONFIG_DEBUG_FS #include +#ifndef MODULE static int boost_summary_show(struct seq_file *s, void *data) { struct rockchip_clk_pll *pll = (struct rockchip_clk_pll *)s->private; @@ -1717,4 +1718,5 @@ static int __init boost_debug_init(void) return 0; } late_initcall(boost_debug_init); -#endif +#endif /* MODULE */ +#endif /* CONFIG_DEBUG_FS */