From e000aa13e47e29fbe3473bfd0277cb057c3160cc Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Wed, 28 Nov 2012 11:28:57 +0530
Subject: [PATCH] ARM: OMAP2+: Fix realtime_counter_init warning in timer.c
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In commit fa6d79d (ARM: OMAP: Add initialisation for the real-time
counter), the function realtime_counter_init() was added. However, if
the kernel configuration option CONFIG_SOC_OMAP5 is not selected then
the following compiler warning is observed.
CC arch/arm/mach-omap2/timer.o
arch/arm/mach-omap2/timer.c:489:20: warning: ‘realtime_counter_init’
defined but not used [-Wunused-function]
It is because of the stub init function which was added for the cases
where realtime_counter_init() is called with !CONFIG_SOC_HAS_REALTIME_COUNTER.
This is actually not necessary since the SOC which need this feature
will explicitly select the configuration.
So just drop the unused stub to avoid the build warning.
Patch is made after seeing Jon's patch which was wrapping the
real-time counter code under needed SOC #ifdef
Cc: Jon Hunter <jon-hunter@ti.com>
Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
arch/arm/mach-omap2/timer.c | 3 ---
1 file changed, 3 deletions(-)
@@ -428,9 +428,6 @@ static void __init realtime_counter_init(void)
iounmap(base);
}
-#else
-static inline void __init realtime_counter_init(void)
-{}
#endif
#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src, \
--
1.7.9.5