aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/timer-of.c
diff options
context:
space:
mode:
authorDaniel Lezcano <[email protected]>2018-01-08 13:28:49 +0000
committerIngo Molnar <[email protected]>2018-01-08 16:57:24 +0000
commit9aea417afa6bf52f15a5b194944b6a646d61af04 (patch)
tree86bf89170a4674fb8b5998669ab8ea5363ef2857 /drivers/clocksource/timer-of.c
parentclocksource/drivers/timer-of: Store the device node pointer in 'struct timer_of' (diff)
downloadkernel-9aea417afa6bf52f15a5b194944b6a646d61af04.tar.gz
kernel-9aea417afa6bf52f15a5b194944b6a646d61af04.zip
clocksource/drivers/timer-of: Don't request the resource by name
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 conflicts on some platforms which have the same name as the node. Tested-by: Benjamin Gaignard <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Benjamin Gaignard <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/clocksource/timer-of.c')
-rw-r--r--drivers/clocksource/timer-of.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
index 25008d2cc346..06ed88a2a8a0 100644
--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -161,11 +161,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);
}