Skip to content

Commit d2353ba

Browse files
committed
ARM: omap2: fix omap5_realtime_timer_init definition
There is one more regression introduced by the last build fix: arch/arm/mach-omap2/timer.c:170:6: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] void __init omap5_realtime_timer_init(void) ^ arch/arm/mach-omap2/common.h:118:20: note: previous definition is here static inline void omap5_realtime_timer_init(void) ^ arch/arm/mach-omap2/timer.c:170:13: error: redefinition of 'omap5_realtime_timer_init' void __init omap5_realtime_timer_init(void) ^ arch/arm/mach-omap2/common.h:118:20: note: previous definition is here static inline void omap5_realtime_timer_init(void) Address this by removing the now obsolete #ifdefs in that file and just building the entire file based on the flag that controls the omap5_realtime_timer_init function declaration. Link: https://lore.kernel.org/r/[email protected] Fixes: d86ad46 ("ARM: OMAP2+: Fix regression for using local timer on non-SMP SoCs") Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent e4df11c commit d2353ba

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

arch/arm/mach-omap2/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common) $(smp-y) sleep44xx.o
4646
obj-$(CONFIG_SOC_AM43XX) += $(omap-4-5-common)
4747
obj-$(CONFIG_SOC_DRA7XX) += $(omap-4-5-common) $(smp-y) sleep44xx.o
4848

49-
omap5-dra7-common = timer.o
50-
obj-$(CONFIG_SOC_OMAP5) += $(omap5-dra7-common)
51-
obj-$(CONFIG_SOC_DRA7XX) += $(omap5-dra7-common)
49+
omap5-dra7-common-$(CONFIG_SOC_HAS_REALTIME_COUNTER) = timer.o
50+
obj-$(CONFIG_SOC_OMAP5) += $(omap5-dra7-common-y)
51+
obj-$(CONFIG_SOC_DRA7XX) += $(omap5-dra7-common-y)
5252

5353
# Functions loaded to SRAM
5454
obj-$(CONFIG_SOC_OMAP2420) += sram242x.o

arch/arm/mach-omap2/timer.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
#define INCREMENTER_DENUMERATOR_RELOAD_OFFSET 0x14
4040
#define NUMERATOR_DENUMERATOR_MASK 0xfffff000
4141

42-
#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
43-
4442
static unsigned long arch_timer_freq;
4543

4644
void set_cntfreq(void)
@@ -159,14 +157,6 @@ static void __init realtime_counter_init(void)
159157
iounmap(base);
160158
}
161159

162-
#else
163-
164-
static inline void realtime_counter_init(void)
165-
{
166-
}
167-
168-
#endif /* CONFIG_SOC_HAS_REALTIME_COUNTER */
169-
170160
void __init omap5_realtime_timer_init(void)
171161
{
172162
omap_clk_init();

0 commit comments

Comments
 (0)