Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754463AbeAHRdc (ORCPT + 1 other); Mon, 8 Jan 2018 12:33:32 -0500 Received: from terminus.zytor.com ([65.50.211.136]:48487 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754426AbeAHRd3 (ORCPT ); Mon, 8 Jan 2018 12:33:29 -0500 Date: Mon, 8 Jan 2018 09:30:04 -0800 From: tip-bot for Daniel Lezcano Message-ID: Cc: peterz@infradead.org, tglx@linutronix.de, daniel.lezcano@linaro.org, benjamin.gaignard@st.com, hpa@zytor.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, mingo@kernel.org Reply-To: peterz@infradead.org, tglx@linutronix.de, daniel.lezcano@linaro.org, benjamin.gaignard@st.com, hpa@zytor.com, torvalds@linux-foundation.org, mingo@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1515418139-23276-10-git-send-email-daniel.lezcano@linaro.org> References: <1515418139-23276-10-git-send-email-daniel.lezcano@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] clocksource/drivers/timer-of: Don't request the resource by name Git-Commit-ID: 9aea417afa6bf52f15a5b194944b6a646d61af04 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Commit-ID: 9aea417afa6bf52f15a5b194944b6a646d61af04 Gitweb: https://git.kernel.org/tip/9aea417afa6bf52f15a5b194944b6a646d61af04 Author: Daniel Lezcano AuthorDate: Mon, 8 Jan 2018 14:28:49 +0100 Committer: Ingo Molnar CommitDate: Mon, 8 Jan 2018 17:57:24 +0100 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 Signed-off-by: Daniel Lezcano Acked-by: Benjamin Gaignard Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1515418139-23276-10-git-send-email-daniel.lezcano@linaro.org Signed-off-by: Ingo Molnar --- 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 25008d2..06ed88a 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); }