Skip to content

Commit c2fe8eb

Browse files
committed
clk: samsung: s3c64xx: declare s3c64xx_clk_init() in shared header
The s3c64xx_clk_init() is defined and used by the clk-s3c64xx driver and also used in the mach-s3c64xx machine code. Move the declaration to a header to fix W=1 build warning: drivers/clk/samsung/clk-s3c64xx.c:391:13: warning: no previous prototype for 's3c64xx_clk_init' [-Wmissing-prototypes] 391 | void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f, Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Stephen Boyd <sboyd@kernel.org>
1 parent f73fefa commit c2fe8eb

5 files changed

Lines changed: 27 additions & 2 deletions

File tree

‎MAINTAINERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15304,6 +15304,7 @@ F: Documentation/devicetree/bindings/clock/samsung,s3c*
1530415304
F: Documentation/devicetree/bindings/clock/samsung,s5p*
1530515305
F: drivers/clk/samsung/
1530615306
F: include/dt-bindings/clock/exynos*.h
15307+
F: include/linux/clk/samsung.h
1530715308

1530815309
SAMSUNG SPI DRIVERS
1530915310
M: Kukjin Kim <kgene@kernel.org>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <linux/platform_device.h>
2525
#include <linux/reboot.h>
2626
#include <linux/io.h>
27+
#include <linux/clk/samsung.h>
2728
#include <linux/dma-mapping.h>
2829
#include <linux/irq.h>
2930
#include <linux/gpio.h>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ void s3c64xx_init_io(struct map_desc *mach_desc, int size);
2222
void s3c64xx_restart(enum reboot_mode mode, const char *cmd);
2323

2424
struct device_node;
25-
void s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,
26-
unsigned long xusbxti_f, bool is_s3c6400, void __iomem *reg_base);
2725
void s3c64xx_set_xtal_freq(unsigned long freq);
2826
void s3c64xx_set_xusbxti_freq(unsigned long freq);
2927

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

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

88
#include <linux/slab.h>
99
#include <linux/clk-provider.h>
10+
#include <linux/clk/samsung.h>
1011
#include <linux/of.h>
1112
#include <linux/of_address.h>
1213

‎include/linux/clk/samsung.h‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* Copyright (c) 2020 Krzysztof Kozlowski <krzk@kernel.org>
4+
*/
5+
6+
#ifndef __LINUX_CLK_SAMSUNG_H_
7+
#define __LINUX_CLK_SAMSUNG_H_
8+
9+
#include <linux/compiler_types.h>
10+
11+
struct device_node;
12+
13+
#ifdef CONFIG_ARCH_S3C64XX
14+
void s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,
15+
unsigned long xusbxti_f, bool s3c6400,
16+
void __iomem *base);
17+
#else
18+
static inline void s3c64xx_clk_init(struct device_node *np,
19+
unsigned long xtal_f,
20+
unsigned long xusbxti_f,
21+
bool s3c6400, void __iomem *base) { }
22+
#endif /* CONFIG_ARCH_S3C64XX */
23+
24+
#endif /* __LINUX_CLK_SAMSUNG_H_ */

0 commit comments

Comments
 (0)