aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/coresight/coresight-funnel.c
diff options
context:
space:
mode:
authorSuzuki K Poulose <suzuki.poulose@arm.com>2019-06-19 13:52:53 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-20 07:56:11 +0200
commita15dab756b0f4687a7c3e9e54767f58fbc63c603 (patch)
tree9a06474c2edab5969d2dd580497ad2890036aef4 /drivers/hwtracing/coresight/coresight-funnel.c
parentcoresight: platform: Make memory allocation helper generic (diff)
downloadlinux-dev-a15dab756b0f4687a7c3e9e54767f58fbc63c603.tar.xz
linux-dev-a15dab756b0f4687a7c3e9e54767f58fbc63c603.zip
coresight: Make sure device uses DT for obsolete compatible check
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. Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-funnel.c')
-rw-r--r--drivers/hwtracing/coresight/coresight-funnel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c
index 6236a847bb0b..3423042e7a52 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);