Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+9 -3
+1 -2
arch/arm/mach-socfpga/socfpga.c
··· 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 31 void __iomem *rst_manager_base_addr; 33 32 void __iomem *sdr_ctl_base_addr; 34 33 unsigned long socfpga_cpu1start_addr; 35 - 36 - extern void __init socfpga_reset_init(void); 37 34 38 35 static void __init socfpga_sysmgr_init(void) 39 36 {
+1 -1
drivers/reset/reset-socfpga.c
··· 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> ··· 19 18 #include "reset-simple.h" 20 19 21 20 #define SOCFPGA_NR_BANKS 8 22 - void __init socfpga_reset_init(void); 23 21 24 22 static int a10_reset_init(struct device_node *np) 25 23 {
+7
include/linux/reset/socfpga.h
··· 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__ */