Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933391AbeAHN3s (ORCPT + 1 other); Mon, 8 Jan 2018 08:29:48 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34311 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932821AbeAHN3l (ORCPT ); Mon, 8 Jan 2018 08:29:41 -0500 X-Google-Smtp-Source: ACJfBotxjR2tsqSha+nfItZU7Eeg8PVVI93wJpHypvFDV5DeaqxmmnzMQWdXiY7GNfv2WLbpa/F5bA== From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH 10/20] clocksource/drivers/timer-of: Don't request the resource by name Date: Mon, 8 Jan 2018 14:28:49 +0100 Message-Id: <1515418139-23276-10-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515418139-23276-1-git-send-email-daniel.lezcano@linaro.org> References: <1bbaef2e-4080-3f54-7db3-a8989acfd691@free.fr> <1515418139-23276-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 Tested-by: Benjamin Gaignard Acked-by: Benjamin Gaignard --- 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