]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
spi: st-ssc4: add missed pm_runtime_disable
authorChuhong Yuan <hslester96@gmail.com>
Mon, 18 Nov 2019 02:48:48 +0000 (10:48 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:45:21 +0000 (23:45 -0500)
BugLink: https://bugs.launchpad.net/bugs/1859712
[ Upstream commit cd050abeba2a95fe5374eec28ad2244617bcbab6 ]

The driver forgets to call pm_runtime_disable in probe failure
and remove.
Add the missed calls to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20191118024848.21645-1-hslester96@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/spi/spi-st-ssc4.c

index a4e43fc19ece556d5b1c82b4db9416add2afb4ad..5df01ffdef468e4a29aeb9a2cda71c9f12996205 100644 (file)
@@ -385,6 +385,7 @@ static int spi_st_probe(struct platform_device *pdev)
        return 0;
 
 clk_disable:
+       pm_runtime_disable(&pdev->dev);
        clk_disable_unprepare(spi_st->clk);
 put_master:
        spi_master_put(master);
@@ -396,6 +397,8 @@ static int spi_st_remove(struct platform_device *pdev)
        struct spi_master *master = platform_get_drvdata(pdev);
        struct spi_st *spi_st = spi_master_get_devdata(master);
 
+       pm_runtime_disable(&pdev->dev);
+
        clk_disable_unprepare(spi_st->clk);
 
        pinctrl_pm_select_sleep_state(&pdev->dev);