From patchwork Tue May 7 10:52:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 163508 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:81:0:0:0:0 with SMTP id l1csp1185496ilm; Tue, 7 May 2019 03:55:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0FQM4oTidaJmMEOkBQhh6cQrDref58IslN7AdKMELqJwLiSxtHaSJOkVYRIP7V0Yzec33 X-Received: by 2002:a62:ee04:: with SMTP id e4mr13595041pfi.232.1557226549591; Tue, 07 May 2019 03:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557226549; cv=none; d=google.com; s=arc-20160816; b=d64qR0c9hR18IHWXEproYdtDB2oEQeH1RmeBVhiuUGBRo4dNTuFbrT2NyYdPAG3e9f DvAFG5NZbS5lmbA7HBKqd6Qy0R953bA65DPkRlratu9cWcGTjTcfpHLE1oE3pqAbSzg/ LuvnbXIIngbaERTitVcwMM38OsXhyw/i6AMxlqo/a2zaAcVOGeYiAlcV5cH8Jac5p4s3 gru4w5x1CX3seiZPA+RHXpoeC0eGYKQCt8NFC3U/dpW3E9OvEHPIfI+ljwKfcJYRl0ou oJwa+hUfYTUNrewXNZF8T12QuwdCE30Pi146+0SktAejM7M1MjlQcqXAiBQGAM9gAl0I qOJQ== 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; bh=23bo6i0/bB4uDrWmrcXD9+DQxvv7vjB4mEe4r+ZJxgY=; b=db84EYGQ5CaIWniEqMeFdaifQxwqlosNyu4evbnONMiy1FEfEQhIFDmu9bqxlvmLfs Y9wfxK+15LpyKcAXiU7dKWoQsQWrvSHn2t4dqY2atL3vpvHXLi/zP8zwooYA/9IIy/uV 2dESiZkXM8g/sUfcsd7LJ7lS/MbhD/Djh1Y+YjTSYIQGaUYmDZgIqobOeaNPXOvrFJwW WnoKAgEm3rx/2y6tDKGg3/NaEHiR7EFq2unpWuqWtd5Ol5GaoRCv+YUYQ4fNPIWK8PPA u83Cg+eEPtIzU10lRUcPuRkbcwPPQpap4EbZoTESQaY8rX2wHvxDoYbRxnzTPwgU0evg ee1g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si18482294pfr.140.2019.05.07.03.55.49; Tue, 07 May 2019 03:55:49 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727105AbfEGKyF (ORCPT + 30 others); Tue, 7 May 2019 06:54:05 -0400 Received: from foss.arm.com ([217.140.101.70]:50214 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726976AbfEGKyD (ORCPT ); Tue, 7 May 2019 06:54:03 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D54B21688; Tue, 7 May 2019 03:54:02 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7DAAA3F5AF; Tue, 7 May 2019 03:54:01 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, coresight@lists.linaro.org, rjw@rjwysocki.net, mathieu.poirier@linaro.org, Suzuki K Poulose , Leo Yan Subject: [PATCH v3 15/30] coresight: Make sure device uses DT for obsolete compatible check Date: Tue, 7 May 2019 11:52:42 +0100 Message-Id: <1557226378-10131-16-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557226378-10131-1-git-send-email-suzuki.poulose@arm.com> References: <1557226378-10131-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As we prepare to add support for ACPI bindings, let us make sure we do the compatible check only if we are sure we are dealing with a DT based system. Cc: Leo Yan Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-funnel.c | 3 ++- drivers/hwtracing/coresight/coresight-replicator.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.7.4 Reviewed-by: Mathieu Poirier diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c index 6236a84..3423042 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -196,7 +196,8 @@ static int funnel_probe(struct device *dev, struct resource *res) dev->platform_data = pdata; } - if (of_device_is_compatible(np, "arm,coresight-funnel")) + if (is_of_node(dev_fwnode(dev)) && + of_device_is_compatible(dev->of_node, "arm,coresight-funnel")) pr_warn_once("Uses OBSOLETE CoreSight funnel binding\n"); drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c index ee6ad34..7e05145 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -187,7 +187,8 @@ static int replicator_probe(struct device *dev, struct resource *res) dev->platform_data = pdata; } - if (of_device_is_compatible(np, "arm,coresight-replicator")) + if (is_of_node(dev_fwnode(dev)) && + of_device_is_compatible(dev->of_node, "arm,coresight-replicator")) pr_warn_once("Uses OBSOLETE CoreSight replicator binding\n"); drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);