diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-15 14:57:27 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-03 19:45:01 -0400 |
commit | 35f2b0bd5911dc0eef3f5352b6acb79c69420111 (patch) | |
tree | 356642eb53ad43f5f452616844e77e5a45407d43 /arch/arm/mach-shmobile | |
parent | 18c081e27666c5db33075bf7ae4694e091cf1d20 (diff) |
ARM: shmobile: Move definition of shmobile_init_late() to header
The role of the only function in the common.c file in
arch/arm/mach-shmobile, shmobile_init_late(), is to call two
initializers whose definitions depend on kernel configuration
options. Those initializers may very well be called from a static
inline function in arm/mach-shmobile/include/mach/common.h,
though, in which makes the code a bit easier to read. Moreover,
the common.c may be dropped entirely then.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/common.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 8 |
3 files changed, 7 insertions, 27 deletions
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 0df5ae6740c6..fe2c97c179d1 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common objects | 5 | # Common objects |
6 | obj-y := timer.o console.o clock.o common.o | 6 | obj-y := timer.o console.o clock.o |
7 | 7 | ||
8 | # CPU objects | 8 | # CPU objects |
9 | obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o | 9 | obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o |
diff --git a/arch/arm/mach-shmobile/common.c b/arch/arm/mach-shmobile/common.c deleted file mode 100644 index 608aba9d60d7..000000000000 --- a/arch/arm/mach-shmobile/common.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; version 2 of the License. | ||
5 | * | ||
6 | * This program is distributed in the hope that it will be useful, | ||
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
9 | * GNU General Public License for more details. | ||
10 | * | ||
11 | * You should have received a copy of the GNU General Public License | ||
12 | * along with this program; if not, write to the Free Software | ||
13 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
14 | * | ||
15 | */ | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <mach/common.h> | ||
19 | |||
20 | void __init shmobile_init_late(void) | ||
21 | { | ||
22 | shmobile_suspend_init(); | ||
23 | shmobile_cpuidle_init(); | ||
24 | } | ||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 45e61dada030..9175c183ba7a 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -86,8 +86,6 @@ extern int r8a7779_boot_secondary(unsigned int cpu); | |||
86 | extern void r8a7779_smp_prepare_cpus(void); | 86 | extern void r8a7779_smp_prepare_cpus(void); |
87 | extern void r8a7779_register_twd(void); | 87 | extern void r8a7779_register_twd(void); |
88 | 88 | ||
89 | extern void shmobile_init_late(void); | ||
90 | |||
91 | #ifdef CONFIG_SUSPEND | 89 | #ifdef CONFIG_SUSPEND |
92 | int shmobile_suspend_init(void); | 90 | int shmobile_suspend_init(void); |
93 | #else | 91 | #else |
@@ -100,4 +98,10 @@ int shmobile_cpuidle_init(void); | |||
100 | static inline int shmobile_cpuidle_init(void) { return 0; } | 98 | static inline int shmobile_cpuidle_init(void) { return 0; } |
101 | #endif | 99 | #endif |
102 | 100 | ||
101 | static inline void shmobile_init_late(void) | ||
102 | { | ||
103 | shmobile_suspend_init(); | ||
104 | shmobile_cpuidle_init(); | ||
105 | } | ||
106 | |||
103 | #endif /* __ARCH_MACH_COMMON_H */ | 107 | #endif /* __ARCH_MACH_COMMON_H */ |