diff options
author | Suzuki K Poulose <suzuki.poulose@arm.com> | 2019-06-19 13:52:54 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-20 07:56:11 +0200 |
commit | f03631da4be33219021323630a8cf788fd066267 (patch) | |
tree | 6147d521370b8e95552954d424fc17bf7a3b651c /drivers/hwtracing/coresight/coresight-funnel.c | |
parent | a15dab756b0f4687a7c3e9e54767f58fbc63c603 (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-funnel.c')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-funnel.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c index 3423042e7a52..fc033fdb6cd5 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -187,14 +187,11 @@ static int funnel_probe(struct device *dev, struct resource *res) struct coresight_platform_data *pdata = NULL; struct funnel_drvdata *drvdata; struct coresight_desc desc = { 0 }; - struct device_node *np = dev->of_node; - if (np) { - pdata = of_get_coresight_platform_data(dev, np); - if (IS_ERR(pdata)) - return PTR_ERR(pdata); - dev->platform_data = pdata; - } + pdata = coresight_get_platform_data(dev); + if (IS_ERR(pdata)) + return PTR_ERR(pdata); + dev->platform_data = pdata; if (is_of_node(dev_fwnode(dev)) && of_device_is_compatible(dev->of_node, "arm,coresight-funnel")) |