Commit cd050abe authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Mark Brown

spi: st-ssc4: add missed pm_runtime_disable

The driver forgets to call pm_runtime_disable in probe failure
and remove.
Add the missed calls to fix it.
Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20191118024848.21645-1-hslester96@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 04358e40
...@@ -381,6 +381,7 @@ static int spi_st_probe(struct platform_device *pdev) ...@@ -381,6 +381,7 @@ static int spi_st_probe(struct platform_device *pdev)
return 0; return 0;
clk_disable: clk_disable:
pm_runtime_disable(&pdev->dev);
clk_disable_unprepare(spi_st->clk); clk_disable_unprepare(spi_st->clk);
put_master: put_master:
spi_master_put(master); spi_master_put(master);
...@@ -392,6 +393,8 @@ static int spi_st_remove(struct platform_device *pdev) ...@@ -392,6 +393,8 @@ static int spi_st_remove(struct platform_device *pdev)
struct spi_master *master = platform_get_drvdata(pdev); struct spi_master *master = platform_get_drvdata(pdev);
struct spi_st *spi_st = spi_master_get_devdata(master); struct spi_st *spi_st = spi_master_get_devdata(master);
pm_runtime_disable(&pdev->dev);
clk_disable_unprepare(spi_st->clk); clk_disable_unprepare(spi_st->clk);
pinctrl_pm_select_sleep_state(&pdev->dev); pinctrl_pm_select_sleep_state(&pdev->dev);
......
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