mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
c54d86641f
commit
7b11ef9653
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue