summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeitao Hou <houweitaoo@gmail.com>2019-05-26 03:13:24 -0400
committerVinod Koul <vkoul@kernel.org>2019-05-27 02:42:17 -0400
commit7b11ef9653d2520540df708f92949f06ed8a42e2 (patch)
tree93aab8be7b47932bbccc990de1e78e1ef77f7e25
parentc54d86641fe774154b7742b765e3e2f8affcb7e6 (diff)
dmaengine: stm32: use to_platform_device()
Use to_platform_device() instead of open-coding it. Signed-off-by: Weitao Hou <houweitaoo@gmail.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/dma/stm32-dmamux.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index a67119199c45..63af24d4c834 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -306,8 +306,7 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
306#ifdef CONFIG_PM 306#ifdef CONFIG_PM
307static int stm32_dmamux_runtime_suspend(struct device *dev) 307static int stm32_dmamux_runtime_suspend(struct device *dev)
308{ 308{
309 struct platform_device *pdev = 309 struct platform_device *pdev = to_platform_device(dev);
310 container_of(dev, struct platform_device, dev);
311 struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev); 310 struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
312 311
313 clk_disable_unprepare(stm32_dmamux->clk); 312 clk_disable_unprepare(stm32_dmamux->clk);
@@ -317,8 +316,7 @@ static int stm32_dmamux_runtime_suspend(struct device *dev)
317 316
318static int stm32_dmamux_runtime_resume(struct device *dev) 317static int stm32_dmamux_runtime_resume(struct device *dev)
319{ 318{
320 struct platform_device *pdev = 319 struct platform_device *pdev = to_platform_device(dev);
321 container_of(dev, struct platform_device, dev);
322 struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev); 320 struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
323 int ret; 321 int ret;
324 322