public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 08/61] dmaengine: dw: simplify getting .drvdata
@ 2018-04-19 14:05 Wolfram Sang
  2018-04-20  4:33 ` Viresh Kumar
  2018-04-22  6:34 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2018-04-19 14:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-renesas-soc, kernel-janitors, Wolfram Sang, Viresh Kumar,
	Andy Shevchenko, Dan Williams, Vinod Koul, dmaengine

We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Build tested only. buildbot is happy. Please apply individually.

 drivers/dma/dw/platform.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
index bc31fe802061..f62dd0944908 100644
--- a/drivers/dma/dw/platform.c
+++ b/drivers/dma/dw/platform.c
@@ -293,8 +293,7 @@ MODULE_DEVICE_TABLE(acpi, dw_dma_acpi_id_table);
 
 static int dw_suspend_late(struct device *dev)
 {
-	struct platform_device *pdev = to_platform_device(dev);
-	struct dw_dma_chip *chip = platform_get_drvdata(pdev);
+	struct dw_dma_chip *chip = dev_get_drvdata(dev);
 
 	dw_dma_disable(chip);
 	clk_disable_unprepare(chip->clk);
@@ -304,8 +303,7 @@ static int dw_suspend_late(struct device *dev)
 
 static int dw_resume_early(struct device *dev)
 {
-	struct platform_device *pdev = to_platform_device(dev);
-	struct dw_dma_chip *chip = platform_get_drvdata(pdev);
+	struct dw_dma_chip *chip = dev_get_drvdata(dev);
 	int ret;
 
 	ret = clk_prepare_enable(chip->clk);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 08/61] dmaengine: dw: simplify getting .drvdata
  2018-04-19 14:05 [PATCH 08/61] dmaengine: dw: simplify getting .drvdata Wolfram Sang
@ 2018-04-20  4:33 ` Viresh Kumar
  2018-04-22  6:34 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2018-04-20  4:33 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, linux-renesas-soc, kernel-janitors, Viresh Kumar,
	Andy Shevchenko, Dan Williams, Vinod Koul, dmaengine

On 19-04-18, 16:05, Wolfram Sang wrote:
> We should get drvdata from struct device directly. Going via
> platform_device is an unneeded step back and forth.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> Build tested only. buildbot is happy. Please apply individually.
> 
>  drivers/dma/dw/platform.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 08/61] dmaengine: dw: simplify getting .drvdata
  2018-04-19 14:05 [PATCH 08/61] dmaengine: dw: simplify getting .drvdata Wolfram Sang
  2018-04-20  4:33 ` Viresh Kumar
@ 2018-04-22  6:34 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2018-04-22  6:34 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, linux-renesas-soc, kernel-janitors, Viresh Kumar,
	Andy Shevchenko, Dan Williams, dmaengine

On Thu, Apr 19, 2018 at 04:05:38PM +0200, Wolfram Sang wrote:
> We should get drvdata from struct device directly. Going via
> platform_device is an unneeded step back and forth.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-22  6:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-19 14:05 [PATCH 08/61] dmaengine: dw: simplify getting .drvdata Wolfram Sang
2018-04-20  4:33 ` Viresh Kumar
2018-04-22  6:34 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox