From patchwork Mon Jan 8 13:28:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 123711 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2726949qgn; Mon, 8 Jan 2018 05:29:50 -0800 (PST) X-Google-Smtp-Source: ACJfBoukKkq7SF7mkRpUS2HIHPNc+DEOISSz21EjsMhUFDFy1MYWrcXiPb+y5sA40nUjrP59qsTa X-Received: by 10.84.244.2 with SMTP id g2mr6514891pll.206.1515418190576; Mon, 08 Jan 2018 05:29:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515418190; cv=none; d=google.com; s=arc-20160816; b=zXQvqGAFhB67tRS/YngsDdAJScQ5rrd3LQ6TZEP5UztbiJ9KtdeadsspFTKD6whGo0 KIHldGhGjOT4elpArue8b1GHapfp63HWQLQYEXB4ODLAVSKQfKAwJV1vjWcUGj4cbTil uVsjRnwe37T9DeqOY0svWhJx+c8urKCTXxrTizyvzWWeCDC32kU/O23Yl//mCw/waUu3 g6VbROhtEh1Ae+5TDut7pjyXu1/+Kifd78rUfs+j1Q0pNZ/U5+YpXdEA1NDgSKVMopKW lzlDPLSlUqfgCVcqE/HB20XhfKH+1ENzuuV6iuBy2N1YlNr18gBxNzZOQVnFH+M9Kyga 2oNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=J9V9u5gzR2uoPykGLsgQl9f26d1ZZq2awKorbIZ53vM=; b=i2YJ6CiJU5tFB322VBzt5PiPo0JR8b/5y5rafqX/IKr2vK1Jvfl4iV2AHNehxWKpgr NPVZjekeiYgfyWs+pjneVvGO8IMr6+2TRhFx6ngVlPSC9EVJGAvmkR3NOjY3sBe8k6ql W4KzdNzd01r2ezvu0ejUnro1zJsWi8yJbPuVt3y6k0EbIKuM3RJ8/swLeBwb14oXyXkB llmo0d1N5v8wqhPlRrel3gyaDXk/On3RVWXK48GLO8s2zyf69jPOnd+pc45HDL4sZ7p5 ihUBEqvp5Aa+dPBGwx0UGKSMN5NEiMbBzwCQWQL08HjIAGQQdTPorN4sBJ8RL2sdJrNO PGwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZeNOwRti; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c16si8730673plo.46.2018.01.08.05.29.50; Mon, 08 Jan 2018 05:29:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZeNOwRti; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933391AbeAHN3s (ORCPT + 28 others); 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 Received: by mail-wr0-f193.google.com with SMTP id 36so10742584wrh.1 for ; Mon, 08 Jan 2018 05:29:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=J9V9u5gzR2uoPykGLsgQl9f26d1ZZq2awKorbIZ53vM=; b=ZeNOwRtiehLzb3jwrw51H4mBdM2Ot70pyUQCsb4iPmAPlLhwEn/G37K8E+s6Sg9SKF MdbVP+2UPTlTHVlqf9hRqpfLBHByDqGXmJOH8R3HxOf86gAPxcct606yK4E4FCQ3mRfM dxs2KE1qv2hgIU/A2B9ZPvg+pnOv3bA9qO4SI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=J9V9u5gzR2uoPykGLsgQl9f26d1ZZq2awKorbIZ53vM=; b=dDcT9dO+3LLAM9Y8E7RMdkzdN9dwWjPkXK06fAFdn3XA0b+13CjPYjGDH96SqpiyfO tjS2iSLT8CDtlXGOD3oO53l45JnxB+XAqJRLo0pN31UTxNzGDcv9S7J9agqj3y15KvZh VrW+GVfES7LHH/qukUBl6PzPISYZy0xNQWwhgI2TS1tJTc7KQvHL5ww9WdvoeCdzNp4b PiyrqlKYFclF8z3maknFd78Zd+Z+sEa7Enl7Np+iNcvyYx1N2FU2WfhrmSi2OAdVTrbb +qPYm0iw4JzcfW2XGpICtBWy6TtF7MPqbUtJ+ERMxCb6UkFiTGQmGcm7fKfOEs6WdTVP TARQ== X-Gm-Message-State: AKGB3mKgymCSawn/f4AvnzdYNAathJ599chnZ/tHIoXRadAfom5FEfhT qRFBdVXNXqWtbidwwP7bKitnxQ== X-Received: by 10.223.193.11 with SMTP id r11mr3178041wre.175.1515418180128; Mon, 08 Jan 2018 05:29:40 -0800 (PST) Received: from mai.lan ([2001:41d0:fe90:b800:312a:53a5:1bef:6622]) by smtp.gmail.com with ESMTPSA id q196sm14354222wmb.22.2018.01.08.05.29.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Jan 2018 05:29:39 -0800 (PST) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 Tested-by: Benjamin Gaignard Acked-by: Benjamin Gaignard --- drivers/clocksource/timer-of.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 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); }