coresight: tpiu: Clean up device specific data
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 19 Jun 2019 17:29:14 +0000 (11:29 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jun 2019 18:29:14 +0000 (20:29 +0200)
Switch to using the coresight device instead of the parent
amba device.

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>
drivers/hwtracing/coresight/coresight-tpiu.c

index 63d9af3..4dd3e7f 100644 (file)
 
 /**
  * @base:      memory mapped base address for this component.
- * @dev:       the device entity associated to this component.
  * @atclk:     optional clock for the core parts of the TPIU.
  * @csdev:     component vitals needed by the framework.
  */
 struct tpiu_drvdata {
        void __iomem            *base;
-       struct device           *dev;
        struct clk              *atclk;
        struct coresight_device *csdev;
 };
@@ -75,7 +73,7 @@ static int tpiu_enable(struct coresight_device *csdev, u32 mode, void *__unused)
 
        tpiu_enable_hw(drvdata);
        atomic_inc(csdev->refcnt);
-       dev_dbg(drvdata->dev, "TPIU enabled\n");
+       dev_dbg(&csdev->dev, "TPIU enabled\n");
        return 0;
 }
 
@@ -104,7 +102,7 @@ static int tpiu_disable(struct coresight_device *csdev)
 
        tpiu_disable_hw(drvdata);
 
-       dev_dbg(drvdata->dev, "TPIU disabled\n");
+       dev_dbg(&csdev->dev, "TPIU disabled\n");
        return 0;
 }
 
@@ -139,7 +137,6 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id)
        if (!drvdata)
                return -ENOMEM;
 
-       drvdata->dev = &adev->dev;
        drvdata->atclk = devm_clk_get(&adev->dev, "atclk"); /* optional */
        if (!IS_ERR(drvdata->atclk)) {
                ret = clk_prepare_enable(drvdata->atclk);