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
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; · 7 unmodified lines
32void __iomem *sdr_ctl_base_addr;33void __iomem *sdr_ctl_base_addr;
33unsigned long socfpga_cpu1start_addr;34unsigned long socfpga_cpu1start_addr;
34 35
35extern void __init socfpga_reset_init(void);
36
37static void __init socfpga_sysmgr_init(void)36static void __init socfpga_sysmgr_init(void)
38{37{
39 struct device_node *np;38 struct device_node *np;
drivers/reset/reset-socfpga.c+1−1
@@ -11,6 +11,7 @@ · 10 unmodified lines
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 @@ · 1 unmodified line
18#include "reset-simple.h"19#include "reset-simple.h"
19 20
20#define SOCFPGA_NR_BANKS 821#define SOCFPGA_NR_BANKS 8
21void __init socfpga_reset_init(void);
22 22
23static int a10_reset_init(struct device_node *np)23static int a10_reset_init(struct device_node *np)
24{24{
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
5void __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