summaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/coresight/coresight-stm.c
diff options
context:
space:
mode:
authorSuzuki K Poulose <suzuki.poulose@arm.com>2019-06-19 13:52:54 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-20 07:56:11 +0200
commitf03631da4be33219021323630a8cf788fd066267 (patch)
tree6147d521370b8e95552954d424fc17bf7a3b651c /drivers/hwtracing/coresight/coresight-stm.c
parenta15dab756b0f4687a7c3e9e54767f58fbc63c603 (diff)
coresight: Introduce generic platform data helper
So far we have hard coded the DT platform parsing code in every driver. Introduce generic helper to parse the information provided by the firmware in a platform agnostic manner, in preparation for the ACPI support. 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-stm.c')
-rw-r--r--drivers/hwtracing/coresight/coresight-stm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
index 3992a35e34e4..9faa1ed01500 100644
--- a/drivers/hwtracing/coresight/coresight-stm.c
+++ b/drivers/hwtracing/coresight/coresight-stm.c
@@ -809,14 +809,11 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
struct resource ch_res;
size_t bitmap_size;
struct coresight_desc desc = { 0 };
- struct device_node *np = adev->dev.of_node;
- if (np) {
- pdata = of_get_coresight_platform_data(dev, np);
- if (IS_ERR(pdata))
- return PTR_ERR(pdata);
- adev->dev.platform_data = pdata;
- }
+ pdata = coresight_get_platform_data(dev);
+ if (IS_ERR(pdata))
+ return PTR_ERR(pdata);
+ adev->dev.platform_data = pdata;
drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata)
return -ENOMEM;