From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/23] ARM: u300: device tree support for the timer
Date: Mon, 22 Apr 2013 13:36:21 +0200 [thread overview]
Message-ID: <201304221336.21921.arnd@arndb.de> (raw)
In-Reply-To: <1366624304-6190-1-git-send-email-linus.walleij@stericsson.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Linus Walleij <linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 03/23] ARM: u300: device tree support for the timer
Date: Mon, 22 Apr 2013 13:36:21 +0200 [thread overview]
Message-ID: <201304221336.21921.arnd@arndb.de> (raw)
In-Reply-To: <1366624304-6190-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
On Monday 22 April 2013, Linus Walleij wrote:
> +#ifdef CONFIG_OF
> + struct device_node *timer = NULL;
> +
> + timer = of_find_node_by_path("/timer0@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
next prev parent reply other threads:[~2013-04-22 11:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 9:51 [PATCH 03/23] ARM: u300: device tree support for the timer Linus Walleij
2013-04-22 9:51 ` Linus Walleij
2013-04-22 11:36 ` Arnd Bergmann [this message]
2013-04-22 11:36 ` Arnd Bergmann
2013-04-26 13:38 ` Linus Walleij
2013-04-26 13:38 ` Linus Walleij
2013-04-26 13:44 ` Rob Herring
2013-04-26 13:44 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201304221336.21921.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.