Skip to content

Commit

Permalink
ARM: shmobile: Move definition of shmobile_init_late() to header
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Magnus Damm <[email protected]>
  • Loading branch information
rjwysocki committed Sep 3, 2012
1 parent 18c081e commit 35f2b0b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-shmobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# Common objects
obj-y := timer.o console.o clock.o common.o
obj-y := timer.o console.o clock.o

# CPU objects
obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o
Expand Down
24 changes: 0 additions & 24 deletions arch/arm/mach-shmobile/common.c

This file was deleted.

8 changes: 6 additions & 2 deletions arch/arm/mach-shmobile/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ extern int r8a7779_boot_secondary(unsigned int cpu);
extern void r8a7779_smp_prepare_cpus(void);
extern void r8a7779_register_twd(void);

extern void shmobile_init_late(void);

#ifdef CONFIG_SUSPEND
int shmobile_suspend_init(void);
#else
Expand All @@ -100,4 +98,10 @@ int shmobile_cpuidle_init(void);
static inline int shmobile_cpuidle_init(void) { return 0; }
#endif

static inline void shmobile_init_late(void)
{
shmobile_suspend_init();
shmobile_cpuidle_init();
}

#endif /* __ARCH_MACH_COMMON_H */

0 comments on commit 35f2b0b

Please sign in to comment.