Commit 7b11ef96 authored by Weitao Hou's avatar Weitao Hou Committed by Vinod Koul

dmaengine: stm32: use to_platform_device()

Use to_platform_device() instead of open-coding it.
Signed-off-by: default avatarWeitao Hou <houweitaoo@gmail.com>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent c54d8664
...@@ -306,8 +306,7 @@ static int stm32_dmamux_probe(struct platform_device *pdev) ...@@ -306,8 +306,7 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int stm32_dmamux_runtime_suspend(struct device *dev) static int stm32_dmamux_runtime_suspend(struct device *dev)
{ {
struct platform_device *pdev = struct platform_device *pdev = to_platform_device(dev);
container_of(dev, struct platform_device, dev);
struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev); struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
clk_disable_unprepare(stm32_dmamux->clk); clk_disable_unprepare(stm32_dmamux->clk);
...@@ -317,8 +316,7 @@ static int stm32_dmamux_runtime_suspend(struct device *dev) ...@@ -317,8 +316,7 @@ static int stm32_dmamux_runtime_suspend(struct device *dev)
static int stm32_dmamux_runtime_resume(struct device *dev) static int stm32_dmamux_runtime_resume(struct device *dev)
{ {
struct platform_device *pdev = struct platform_device *pdev = to_platform_device(dev);
container_of(dev, struct platform_device, dev);
struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev); struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment