[PATCH 03/23] ARM: u300: device tree support for the timer

Arnd Bergmann arnd at arndb.de
Mon Apr 22 21:36:21 EST 2013


On Monday 22 April 2013, Linus Walleij wrote:
> +#ifdef CONFIG_OF
> +       struct device_node *timer = NULL;
> +
> +       timer = of_find_node_by_path("/timer0 at c0014000");
> +       if (timer) {
> +               struct resource irq_res;
> +
> +               u300_timer_base = of_iomap(timer, 0);
> +               /* Get the IRQ for the GP1 timer */
> +               irq = of_irq_to_resource(timer, 2, &irq_res);
> +       }
> +#endif

Do you need the #ifdef? The functions should be defined in a way that
removes this code if CONFIG_OF is not defined.

	Arnd


More information about the devicetree-discuss mailing list