History

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.

Philipp Zabel committed 7 years ago

Commit cdbeb311 parent fdce6073 files · +9 −3Browse files

Unified · Split

3 files
  1. arch/arm/mach-socfpga/socfpga.c +1 −2
  2. drivers/reset/reset-socfpga.c +1 −1
  3. include/linux/reset/socfpga.h +7 −0
arch/arm/mach-socfpga/socfpga.c+1−2
@@ -19,6 +19,7 @@ · 18 unmodified lines
1919 #include <linux/of_irq.h>
2020 #include <linux/of_platform.h>
2121 #include <linux/reboot.h>
22+#include <linux/reset/socfpga.h>
2223
2324 #include <asm/hardware/cache-l2x0.h>
2425 #include <asm/mach/arch.h>
@@ -32,8 +33,6 @@ void __iomem *rst_manager_base_addr; · 7 unmodified lines
3233 void __iomem *sdr_ctl_base_addr;
3334 unsigned long socfpga_cpu1start_addr;
3435
35−extern void __init socfpga_reset_init(void);
36−
3736 static void __init socfpga_sysmgr_init(void)
3837 {
3938 struct device_node *np;
drivers/reset/reset-socfpga.c+1−1
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <linux/of_address.h>
1212 #include <linux/platform_device.h>
1313 #include <linux/reset-controller.h>
14+#include <linux/reset/socfpga.h>
1415 #include <linux/slab.h>
1516 #include <linux/spinlock.h>
1617 #include <linux/types.h>
@@ -18,7 +19,6 @@ · 1 unmodified line
1819 #include "reset-simple.h"
1920
2021 #define SOCFPGA_NR_BANKS 8
21−void __init socfpga_reset_init(void);
2222
2323 static int a10_reset_init(struct device_node *np)
2424 {
include/linux/reset/socfpga.h+7−0
@@ -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__ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t