summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-19 22:00:04 +0200
committerArnd Bergmann <arnd@arndb.de>2013-04-19 22:00:04 +0200
commitf4636d0ad7eee4741ef5146080e9ce57b9e2de0b (patch)
tree91505f0e11e58afbd7d28b42b2a1086b4ddc4df2 /drivers/clocksource
parent1f1a73571cb64713641cb75690c4686a4cabc96d (diff)
downloadblackbird-op-linux-f4636d0ad7eee4741ef5146080e9ce57b9e2de0b.tar.gz
blackbird-op-linux-f4636d0ad7eee4741ef5146080e9ce57b9e2de0b.zip
clocksource: exynos_mct: fix build error on non-DT
There is currently no alternative implementation for of_irq_count when the function is not defined, and the declaration is hidden, so this works around calling an undeclared function. It should really not be needed. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/exynos_mct.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 509a6019c96c..661026834b23 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -541,7 +541,11 @@ static void __init mct_init_dt(struct device_node *np, unsigned int int_type)
* timer irqs are specified after the four global timer
* irqs are specified.
*/
+#ifdef CONFIG_OF
nr_irqs = of_irq_count(np);
+#else
+ nr_irqs = 0;
+#endif
for (i = MCT_L0_IRQ; i < nr_irqs; i++)
mct_irqs[i] = irq_of_parse_and_map(np, i);
OpenPOWER on IntegriCloud