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

reset: sunxi: declare sun6i_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 sun6i_reset_init
in a common header.

Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

+9 -1
+1 -1
arch/arm/mach-sunxi/sunxi.c
··· 14 14 #include <linux/clocksource.h> 15 15 #include <linux/init.h> 16 16 #include <linux/platform_device.h> 17 + #include <linux/reset/sunxi.h> 17 18 18 19 #include <asm/mach/arch.h> 19 20 #include <asm/secure_cntvoff.h> ··· 38 37 NULL, 39 38 }; 40 39 41 - extern void __init sun6i_reset_init(void); 42 40 static void __init sun6i_timer_init(void) 43 41 { 44 42 of_clk_init(NULL);
+1
drivers/reset/reset-sunxi.c
··· 18 18 #include <linux/of_address.h> 19 19 #include <linux/platform_device.h> 20 20 #include <linux/reset-controller.h> 21 + #include <linux/reset/sunxi.h> 21 22 #include <linux/slab.h> 22 23 #include <linux/spinlock.h> 23 24 #include <linux/types.h>
+7
include/linux/reset/sunxi.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __LINUX_RESET_SUNXI_H__ 3 + #define __LINUX_RESET_SUNXI_H__ 4 + 5 + void __init sun6i_reset_init(void); 6 + 7 + #endif /* __LINUX_RESET_SUNXI_H__ */