Commit 35f2b0bd authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarMagnus Damm <damm@opensource.se>
parent 18c081e2
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Common objects # Common objects
obj-y := timer.o console.o clock.o common.o obj-y := timer.o console.o clock.o
# CPU objects # CPU objects
obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o
......
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <mach/common.h>
void __init shmobile_init_late(void)
{
shmobile_suspend_init();
shmobile_cpuidle_init();
}
...@@ -86,8 +86,6 @@ extern int r8a7779_boot_secondary(unsigned int cpu); ...@@ -86,8 +86,6 @@ extern int r8a7779_boot_secondary(unsigned int cpu);
extern void r8a7779_smp_prepare_cpus(void); extern void r8a7779_smp_prepare_cpus(void);
extern void r8a7779_register_twd(void); extern void r8a7779_register_twd(void);
extern void shmobile_init_late(void);
#ifdef CONFIG_SUSPEND #ifdef CONFIG_SUSPEND
int shmobile_suspend_init(void); int shmobile_suspend_init(void);
#else #else
...@@ -100,4 +98,10 @@ int shmobile_cpuidle_init(void); ...@@ -100,4 +98,10 @@ int shmobile_cpuidle_init(void);
static inline int shmobile_cpuidle_init(void) { return 0; } static inline int shmobile_cpuidle_init(void) { return 0; }
#endif #endif
static inline void shmobile_init_late(void)
{
shmobile_suspend_init();
shmobile_cpuidle_init();
}
#endif /* __ARCH_MACH_COMMON_H */ #endif /* __ARCH_MACH_COMMON_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment