]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
clocksource: exynos_mct: fix build error on non-DT
authorArnd Bergmann <arnd@arndb.de>
Fri, 19 Apr 2013 20:00:04 +0000 (22:00 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 19 Apr 2013 20:00:04 +0000 (22:00 +0200)
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>
drivers/clocksource/exynos_mct.c

index 509a6019c96c89375f441fbf92c0d92c3d36b1a0..661026834b23df3643175d43f4166e182d11edbb 100644 (file)
@@ -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);