diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2018-12-13 06:24:36 -0500 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2019-01-28 05:16:04 -0500 |
commit | cdbeb315ed8dcc142a68054899cedd6e4f1fea3f (patch) | |
tree | 760ccfece345b8808712ab013f5b63a2953edbfc | |
parent | fdce60787f6215607dc7ac910cbaf4416684b589 (diff) |
reset: socfpga: declare socfpga_reset_init in a header file
Avoid declaring extern functions in c files. To make sure function
definition and usage don't get out of sync, declare socfpga_reset_init
in a common header.
Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
-rw-r--r-- | arch/arm/mach-socfpga/socfpga.c | 3 | ||||
-rw-r--r-- | drivers/reset/reset-socfpga.c | 2 | ||||
-rw-r--r-- | include/linux/reset/socfpga.h | 7 |
3 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c index afd98971d903..816da0eb6616 100644 --- a/arch/arm/mach-socfpga/socfpga.c +++ b/arch/arm/mach-socfpga/socfpga.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/of_irq.h> | 19 | #include <linux/of_irq.h> |
20 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
21 | #include <linux/reboot.h> | 21 | #include <linux/reboot.h> |
22 | #include <linux/reset/socfpga.h> | ||
22 | 23 | ||
23 | #include <asm/hardware/cache-l2x0.h> | 24 | #include <asm/hardware/cache-l2x0.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
@@ -32,8 +33,6 @@ void __iomem *rst_manager_base_addr; | |||
32 | void __iomem *sdr_ctl_base_addr; | 33 | void __iomem *sdr_ctl_base_addr; |
33 | unsigned long socfpga_cpu1start_addr; | 34 | unsigned long socfpga_cpu1start_addr; |
34 | 35 | ||
35 | extern void __init socfpga_reset_init(void); | ||
36 | |||
37 | static void __init socfpga_sysmgr_init(void) | 36 | static void __init socfpga_sysmgr_init(void) |
38 | { | 37 | { |
39 | struct device_node *np; | 38 | struct device_node *np; |
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index 318cfc51c441..96953992c2bb 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/of_address.h> | 11 | #include <linux/of_address.h> |
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/reset-controller.h> | 13 | #include <linux/reset-controller.h> |
14 | #include <linux/reset/socfpga.h> | ||
14 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
15 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
@@ -18,7 +19,6 @@ | |||
18 | #include "reset-simple.h" | 19 | #include "reset-simple.h" |
19 | 20 | ||
20 | #define SOCFPGA_NR_BANKS 8 | 21 | #define SOCFPGA_NR_BANKS 8 |
21 | void __init socfpga_reset_init(void); | ||
22 | 22 | ||
23 | static int a10_reset_init(struct device_node *np) | 23 | static int a10_reset_init(struct device_node *np) |
24 | { | 24 | { |
diff --git a/include/linux/reset/socfpga.h b/include/linux/reset/socfpga.h new file mode 100644 index 000000000000..b11a2047c342 --- /dev/null +++ b/include/linux/reset/socfpga.h | |||
@@ -0,0 +1,7 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
2 | #ifndef __LINUX_RESET_SOCFPGA_H__ | ||
3 | #define __LINUX_RESET_SOCFPGA_H__ | ||
4 | |||
5 | void __init socfpga_reset_init(void); | ||
6 | |||
7 | #endif /* __LINUX_RESET_SOCFPGA_H__ */ | ||