diff options
| author | Jon Hunter <jon-hunter@ti.com> | 2012-11-15 14:09:03 -0500 |
|---|---|---|
| committer | Jon Hunter <jon-hunter@ti.com> | 2012-11-16 11:35:09 -0500 |
| commit | 258e84af9799b8c81cf856dcbd8e2d4cc082741d (patch) | |
| tree | dec8ce3b8dab55ecbc65f71f716236fdab95acd3 | |
| parent | f7863f7924951f64068eb5214a3dbecde3807a9a (diff) | |
ARM: OMAP2+: Fix compiler warning for 32k timer
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>
| -rw-r--r-- | arch/arm/mach-omap2/timer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 4daa8b41c522..b7f43a28e41f 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
| @@ -162,11 +162,6 @@ static struct of_device_id omap_timer_match[] __initdata = { | |||
| 162 | { } | 162 | { } |
| 163 | }; | 163 | }; |
| 164 | 164 | ||
| 165 | static struct of_device_id omap_counter_match[] __initdata = { | ||
| 166 | { .compatible = "ti,omap-counter32k", }, | ||
| 167 | { } | ||
| 168 | }; | ||
| 169 | |||
| 170 | /** | 165 | /** |
| 171 | * omap_get_timer_dt - get a timer using device-tree | 166 | * omap_get_timer_dt - get a timer using device-tree |
| 172 | * @match - device-tree match structure for matching a device type | 167 | * @match - device-tree match structure for matching a device type |
| @@ -406,6 +401,11 @@ static u32 notrace dmtimer_read_sched_clock(void) | |||
| 406 | } | 401 | } |
| 407 | 402 | ||
| 408 | #ifdef CONFIG_OMAP_32K_TIMER | 403 | #ifdef CONFIG_OMAP_32K_TIMER |
| 404 | static struct of_device_id omap_counter_match[] __initdata = { | ||
| 405 | { .compatible = "ti,omap-counter32k", }, | ||
| 406 | { } | ||
| 407 | }; | ||
| 408 | |||
| 409 | /* Setup free-running counter for clocksource */ | 409 | /* Setup free-running counter for clocksource */ |
| 410 | static int __init omap2_sync32k_clocksource_init(void) | 410 | static int __init omap2_sync32k_clocksource_init(void) |
| 411 | { | 411 | { |
