From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: daniel.lezcano@linaro.org, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, benjamin.gaignard@linaro.org
Subject: [PATCH 02/12] clocksource/drivers/timer-of: Don't request the resource by name
Date: Thu, 4 Jan 2018 13:50:18 +0100 [thread overview]
Message-ID: <1515070228-10481-3-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <1515070228-10481-1-git-send-email-daniel.lezcano@linaro.org>
When the driver does not specify a name for the resource, don't use
of_io_request_and_map but of_iomap. That prevents resource name allocation
conflict on some platforms which have the same name than the node.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/timer-of.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
index 2ae348b..5aa7dcd 100644
--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -162,11 +162,11 @@ static __init void timer_of_base_exit(struct of_timer_base *of_base)
static __init int timer_of_base_init(struct device_node *np,
struct of_timer_base *of_base)
{
- const char *name = of_base->name ? of_base->name : np->full_name;
-
- of_base->base = of_io_request_and_map(np, of_base->index, name);
+ of_base->base = of_base->name ?
+ of_io_request_and_map(np, of_base->index, of_base->name) :
+ of_iomap(np, of_base->index);
if (IS_ERR(of_base->base)) {
- pr_err("Failed to iomap (%s)\n", name);
+ pr_err("Failed to iomap (%s)\n", of_base->name);
return PTR_ERR(of_base->base);
}
--
2.7.4
next prev parent reply other threads:[~2018-01-04 12:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-04 12:50 [PATCH 00/12] clocksource/drivers/stm32: Consolidate the timer Daniel Lezcano
2018-01-04 12:50 ` [PATCH 01/12] clocksource/drivers/timer-of: Store the device node pointer Daniel Lezcano
2018-01-04 12:50 ` Daniel Lezcano [this message]
2018-01-04 12:50 ` [PATCH 03/12] clocksource/drivers/stm32: Fix kernel panic with multiple timers Daniel Lezcano
2018-01-04 12:50 ` [PATCH 04/12] clocksource/drivers/stm32: Convert the driver to timer-of Daniel Lezcano
2018-01-04 12:50 ` [PATCH 05/12] clocksource/drivers/stm32: Use the node name as timer name Daniel Lezcano
2018-01-04 12:50 ` [PATCH 06/12] clocksource/drivers/stm32: Encapsulate the timer width sorting out function Daniel Lezcano
2018-01-04 12:50 ` [PATCH 07/12] clocksource/drivers/stm32: Compute a prescaler value with a targeted rate Daniel Lezcano
2018-01-04 12:50 ` [PATCH 08/12] clocksource/drivers/stm32: Add the oneshot mode Daniel Lezcano
2018-01-04 12:50 ` [PATCH 09/12] clocksource/drivers/stm32: Encapsulate more the clockevent code Daniel Lezcano
2018-01-04 12:50 ` [PATCH 10/12] clocksource/drivers/stm32: Add the clocksource Daniel Lezcano
2018-01-04 12:50 ` [PATCH 11/12] clocksource/drivers/stm32: Add the timer delay Daniel Lezcano
2018-01-04 12:50 ` [PATCH 12/12] clocksource/drivers/stm32: Start the timer's counter sooner Daniel Lezcano
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=1515070228-10481-3-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=benjamin.gaignard@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome