]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: OMAP2+: Fix compiler warning for 32k timer
authorJon Hunter <jon-hunter@ti.com>
Thu, 15 Nov 2012 19:09:03 +0000 (13:09 -0600)
committerJon Hunter <jon-hunter@ti.com>
Fri, 16 Nov 2012 16:35:09 +0000 (10:35 -0600)
Commit "ARM: OMAP2+: Add device-tree support for 32kHz counter"
added structure omap_counter_match to the OMAP2 timer code. When
CONFIG_OMAP_32K_TIMER is not defined this structure generates the
following as it is not used.

  CC      arch/arm/mach-omap2/timer.o
  arch/arm/mach-omap2/timer.c:163:28: warning: 'omap_counter_match'
  defined but not used [-Wunused-variable]

Move the definition of omap_counter_match to avoid this warning when
CONFIG_OMAP_32K_TIMER is not set.

Thanks to Kevin Hilman for tracking down and reporting this problem.

Reported-by: Kevin Hilam <khilman@deeprootsystems.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
arch/arm/mach-omap2/timer.c

index 4daa8b41c522be97fda46d6c8b2de7148a633090..b7f43a28e41f75a402d9fe35d5dd957e01fc9be1 100644 (file)
@@ -162,11 +162,6 @@ static struct of_device_id omap_timer_match[] __initdata = {
        { }
 };
 
-static struct of_device_id omap_counter_match[] __initdata = {
-       { .compatible = "ti,omap-counter32k", },
-       { }
-};
-
 /**
  * omap_get_timer_dt - get a timer using device-tree
  * @match      - device-tree match structure for matching a device type
@@ -406,6 +401,11 @@ static u32 notrace dmtimer_read_sched_clock(void)
 }
 
 #ifdef CONFIG_OMAP_32K_TIMER
+static struct of_device_id omap_counter_match[] __initdata = {
+       { .compatible = "ti,omap-counter32k", },
+       { }
+};
+
 /* Setup free-running counter for clocksource */
 static int __init omap2_sync32k_clocksource_init(void)
 {