1
0
Fork 0

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>
alistair/sunxi64-5.4-dsi
Weitao Hou 2019-05-26 15:13:24 +08:00 committed by Vinod Koul
parent c54d86641f
commit 7b11ef9653
1 changed files with 2 additions and 4 deletions

View File

@ -306,8 +306,7 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
#ifdef CONFIG_PM
static int stm32_dmamux_runtime_suspend(struct device *dev)
{
struct platform_device *pdev =
container_of(dev, struct platform_device, dev);
struct platform_device *pdev = to_platform_device(dev);
struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
clk_disable_unprepare(stm32_dmamux->clk);
@ -317,8 +316,7 @@ static int stm32_dmamux_runtime_suspend(struct device *dev)
static int stm32_dmamux_runtime_resume(struct device *dev)
{
struct platform_device *pdev =
container_of(dev, struct platform_device, dev);
struct platform_device *pdev = to_platform_device(dev);
struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
int ret;