Skip to content

Commit 16b17fc

Browse files
committed
clk: samsung: s3c24xx: declare s3c24xx_common_clk_init() in shared header
The s3c2410_common_clk_init() and others are defined and used by the clk-s3c24xx driver and also used in the mach-s3c24xx machine code. Move the declaration to a header to fix W=1 build warnings: drivers/clk/samsung/clk-s3c2410.c:320:13: warning: no previous prototype for 's3c2410_common_clk_init' [-Wmissing-prototypes] 320 | void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f, drivers/clk/samsung/clk-s3c2412.c:205:13: warning: no previous prototype for 's3c2412_common_clk_init' [-Wmissing-prototypes] 205 | void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f, drivers/clk/samsung/clk-s3c2443.c:341:13: warning: no previous prototype for 's3c2443_common_clk_init' [-Wmissing-prototypes] 341 | void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f, Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Stephen Boyd <sboyd@kernel.org>
1 parent c2fe8eb commit 16b17fc

6 files changed

Lines changed: 36 additions & 15 deletions

File tree

‎arch/arm/mach-s3c24xx/common.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/io.h>
2020
#include <linux/platform_data/dma-s3c24xx.h>
2121
#include <linux/dmaengine.h>
22+
#include <linux/clk/samsung.h>
2223

2324
#include <mach/hardware.h>
2425
#include <mach/regs-clock.h>

‎arch/arm/mach-s3c24xx/common.h‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,4 @@ extern struct platform_device s3c2443_device_dma;
108108

109109
extern struct platform_device s3c2410_device_dclk;
110110

111-
#ifdef CONFIG_S3C2410_COMMON_CLK
112-
void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
113-
int current_soc,
114-
void __iomem *reg_base);
115-
#endif
116-
#ifdef CONFIG_S3C2412_COMMON_CLK
117-
void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f,
118-
unsigned long ext_f, void __iomem *reg_base);
119-
#endif
120-
#ifdef CONFIG_S3C2443_COMMON_CLK
121-
void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
122-
int current_soc,
123-
void __iomem *reg_base);
124-
#endif
125-
126111
#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */

‎drivers/clk/samsung/clk-s3c2410.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include <linux/clk-provider.h>
9+
#include <linux/clk/samsung.h>
910
#include <linux/of.h>
1011
#include <linux/of_address.h>
1112

‎drivers/clk/samsung/clk-s3c2412.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include <linux/clk-provider.h>
9+
#include <linux/clk/samsung.h>
910
#include <linux/io.h>
1011
#include <linux/of.h>
1112
#include <linux/of_address.h>

‎drivers/clk/samsung/clk-s3c2443.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include <linux/clk-provider.h>
9+
#include <linux/clk/samsung.h>
910
#include <linux/io.h>
1011
#include <linux/of.h>
1112
#include <linux/of_address.h>

‎include/linux/clk/samsung.h‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,36 @@ static inline void s3c64xx_clk_init(struct device_node *np,
2121
bool s3c6400, void __iomem *base) { }
2222
#endif /* CONFIG_ARCH_S3C64XX */
2323

24+
#ifdef CONFIG_S3C2410_COMMON_CLK
25+
void s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
26+
int current_soc,
27+
void __iomem *reg_base);
28+
#else
29+
static inline void s3c2410_common_clk_init(struct device_node *np,
30+
unsigned long xti_f,
31+
int current_soc,
32+
void __iomem *reg_base) { }
33+
#endif /* CONFIG_S3C2410_COMMON_CLK */
34+
35+
#ifdef CONFIG_S3C2412_COMMON_CLK
36+
void s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f,
37+
unsigned long ext_f, void __iomem *reg_base);
38+
#else
39+
static inline void s3c2412_common_clk_init(struct device_node *np,
40+
unsigned long xti_f,
41+
unsigned long ext_f,
42+
void __iomem *reg_base) { }
43+
#endif /* CONFIG_S3C2412_COMMON_CLK */
44+
45+
#ifdef CONFIG_S3C2443_COMMON_CLK
46+
void s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
47+
int current_soc,
48+
void __iomem *reg_base);
49+
#else
50+
static inline void s3c2443_common_clk_init(struct device_node *np,
51+
unsigned long xti_f,
52+
int current_soc,
53+
void __iomem *reg_base) { }
54+
#endif /* CONFIG_S3C2443_COMMON_CLK */
55+
2456
#endif /* __LINUX_CLK_SAMSUNG_H_ */

0 commit comments

Comments
 (0)