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.
Unified · Split
| @@ -19,6 +19,7 @@ · 18 unmodified lines | ||
| 19 | 19 | #include <linux/of_irq.h> |
| 20 | 20 | #include <linux/of_platform.h> |
| 21 | 21 | #include <linux/reboot.h> |
| 22 | +#include <linux/reset/socfpga.h> | |
| 22 | 23 | |
| 23 | 24 | #include <asm/hardware/cache-l2x0.h> |
| 24 | 25 | #include <asm/mach/arch.h> |
| @@ -32,8 +33,6 @@ void __iomem *rst_manager_base_addr; · 7 unmodified lines | ||
| 32 | 33 | void __iomem *sdr_ctl_base_addr; |
| 33 | 34 | unsigned long socfpga_cpu1start_addr; |
| 34 | 35 | |
| 35 | −extern void __init socfpga_reset_init(void); | |
| 36 | − | |
| 37 | 36 | static void __init socfpga_sysmgr_init(void) |
| 38 | 37 | { |
| 39 | 38 | struct device_node *np; |
| @@ -11,6 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | #include <linux/of_address.h> |
| 12 | 12 | #include <linux/platform_device.h> |
| 13 | 13 | #include <linux/reset-controller.h> |
| 14 | +#include <linux/reset/socfpga.h> | |
| 14 | 15 | #include <linux/slab.h> |
| 15 | 16 | #include <linux/spinlock.h> |
| 16 | 17 | #include <linux/types.h> |
| @@ -18,7 +19,6 @@ · 1 unmodified line | ||
| 18 | 19 | #include "reset-simple.h" |
| 19 | 20 | |
| 20 | 21 | #define SOCFPGA_NR_BANKS 8 |
| 21 | −void __init socfpga_reset_init(void); | |
| 22 | 22 | |
| 23 | 23 | static int a10_reset_init(struct device_node *np) |
| 24 | 24 | { |
| @@ -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__ */ | |