Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;