diff mbox series

[v2,10/36] coresight: tpiu: Clean up device specific data

Message ID 1555344260-12375-11-git-send-email-suzuki.poulose@arm.com
State New
Headers show
Series coresight: Support for ACPI bindings | expand

Commit Message

Suzuki K Poulose April 15, 2019, 4:03 p.m. UTC
Switch to using the coresight device instead of the parent
amba device.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

---
 drivers/hwtracing/coresight/coresight-tpiu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

-- 
2.7.4

Comments

Mathieu Poirier April 17, 2019, 9:41 p.m. UTC | #1
On Mon, Apr 15, 2019 at 05:03:53PM +0100, Suzuki K Poulose wrote:
> Switch to using the coresight device instead of the parent

> amba device.

> 

> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>

> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

> ---

>  drivers/hwtracing/coresight/coresight-tpiu.c | 6 ++----

>  1 file changed, 2 insertions(+), 4 deletions(-)

> 

> diff --git a/drivers/hwtracing/coresight/coresight-tpiu.c b/drivers/hwtracing/coresight/coresight-tpiu.c

> index 4977467..96af7d5 100644

> --- a/drivers/hwtracing/coresight/coresight-tpiu.c

> +++ b/drivers/hwtracing/coresight/coresight-tpiu.c

> @@ -54,7 +54,6 @@

>   */

>  struct tpiu_drvdata {

>  	void __iomem		*base;

> -	struct device		*dev;


Please cleanup structure documentation.  With that:

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>


>  	struct clk		*atclk;

>  	struct coresight_device	*csdev;

>  };

> @@ -74,7 +73,7 @@ static int tpiu_enable(struct coresight_device *csdev, u32 mode, void *__unused)

>  

>  	tpiu_enable_hw(drvdata);

>  

> -	dev_dbg(drvdata->dev, "TPIU enabled\n");

> +	dev_dbg(&csdev->dev, "TPIU enabled\n");

>  	return 0;

>  }

>  

> @@ -100,7 +99,7 @@ static void tpiu_disable(struct coresight_device *csdev)

>  

>  	tpiu_disable_hw(drvdata);

>  

> -	dev_dbg(drvdata->dev, "TPIU disabled\n");

> +	dev_dbg(&csdev->dev, "TPIU disabled\n");

>  }

>  

>  static const struct coresight_ops_sink tpiu_sink_ops = {

> @@ -134,7 +133,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);

> -- 

> 2.7.4

>
diff mbox series

Patch

diff --git a/drivers/hwtracing/coresight/coresight-tpiu.c b/drivers/hwtracing/coresight/coresight-tpiu.c
index 4977467..96af7d5 100644
--- a/drivers/hwtracing/coresight/coresight-tpiu.c
+++ b/drivers/hwtracing/coresight/coresight-tpiu.c
@@ -54,7 +54,6 @@ 
  */
 struct tpiu_drvdata {
 	void __iomem		*base;
-	struct device		*dev;
 	struct clk		*atclk;
 	struct coresight_device	*csdev;
 };
@@ -74,7 +73,7 @@  static int tpiu_enable(struct coresight_device *csdev, u32 mode, void *__unused)
 
 	tpiu_enable_hw(drvdata);
 
-	dev_dbg(drvdata->dev, "TPIU enabled\n");
+	dev_dbg(&csdev->dev, "TPIU enabled\n");
 	return 0;
 }
 
@@ -100,7 +99,7 @@  static void tpiu_disable(struct coresight_device *csdev)
 
 	tpiu_disable_hw(drvdata);
 
-	dev_dbg(drvdata->dev, "TPIU disabled\n");
+	dev_dbg(&csdev->dev, "TPIU disabled\n");
 }
 
 static const struct coresight_ops_sink tpiu_sink_ops = {
@@ -134,7 +133,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);