From patchwork Wed May 22 10:34:48 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: 164798 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp694683ili; Wed, 22 May 2019 03:36:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhAAHHBJJTUv05b8RtUecZskWsyIBWkODgtBfML/RUcn3bK6c91kd0QMsssr/n8EsW8kVO X-Received: by 2002:a63:d045:: with SMTP id s5mr25745039pgi.199.1558521397513; Wed, 22 May 2019 03:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558521397; cv=none; d=google.com; s=arc-20160816; b=e+54z8mP/z/7QrUagMRpBFzbFGkyImDEXBroObF8DC1z1DCB4uKVad/80HNlhBTlDT +Q5mSWeIuDOOIgOkeEw1Rxl9uWyLUcFTWZKUbsaROQT37XbIiX9vbbkequkycsiG1XQQ 3K2CvesJtRl2DvoheFzZcHRvLtFJKgJOqqbJ2YrGm8ZFBZ1iavo5jdIHSXDeC5sWw8Rf 9klOuCzRAJHIDvRv3RugV1fH24AlGFx2oX1ugnTdy1+ZuNb7Eu2nn6Qf0RUMOeGl6fnf YmI3q9ped8/+XVXFsjPJubBmRnc4uvS/iWSjL1M81XVtdkgCYwNEN4CRXD0nRnZw7K8N H9LQ== 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=Y9g+40kehwaAVnJn8FPZu4QUTfSqPVDamtQWqF2rSjc=; b=Mssz8pq/keiKrWw3/FGENO3p+Y0JB063MRHajr8A5mp1XHqhFN0ATNVgnlXMO7HUcH VGG5lTSsZtf0xNAmKt/7b98z/IsNLwL/Vtl1LOxcQbmqa7MmiLac3DsHRKcSZHpb7vxS URhLp2zzygsyf8n8cBBZHiwXpXf7Hs3lv5wHGCVnC0RJ+JCI8aZi7oSnl5/dw0roBVkm avqRZ8JYt38ABYtU4W9HFBoE0bxpQNwEVfkPl92h1Ja4zo2toYCcBlx0lWBIE6sHZ+KK /qGHf3bNSNMQ5aFsGXDXD/pqQ5/z13/+YNkBNnEQpWI4yOrp0foZOp25i+u1DQKvw8b0 O+HQ== 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 u21si21031822pga.151.2019.05.22.03.36.36; Wed, 22 May 2019 03:36:37 -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 S1729425AbfEVKfq (ORCPT + 30 others); Wed, 22 May 2019 06:35:46 -0400 Received: from foss.arm.com ([217.140.101.70]:47074 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729363AbfEVKfi (ORCPT ); Wed, 22 May 2019 06:35:38 -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 B307B15AB; Wed, 22 May 2019 03:35:37 -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 A39203F575; Wed, 22 May 2019 03:35:36 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org, coresight@lists.linaro.org, Suzuki K Poulose Subject: [PATCH v4 15/30] coresight: Make sure device uses DT for obsolete compatible check Date: Wed, 22 May 2019 11:34:48 +0100 Message-Id: <1558521304-27469-16-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1558521304-27469-1-git-send-email-suzuki.poulose@arm.com> References: <1558521304-27469-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. Reviewed-by: 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 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);