diff --git a/sound/soc/tegra-alt/tegra186_arad_alt.c b/sound/soc/tegra-alt/tegra186_arad_alt.c index 5a9ca9e7..9f918d80 100644 --- a/sound/soc/tegra-alt/tegra186_arad_alt.c +++ b/sound/soc/tegra-alt/tegra186_arad_alt.c @@ -106,7 +106,18 @@ static int tegra186_arad_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra186_arad_suspend(struct device *dev) { - return 0; + if (pm_runtime_status_suspended(dev)) + return 0; + + return tegra186_arad_runtime_suspend(dev); +} + +static int tegra186_arad_resume(struct device *dev) +{ + if (pm_runtime_status_suspended(dev)) + return 0; + + return tegra186_arad_runtime_resume(dev); } #endif @@ -894,7 +905,8 @@ static int tegra186_arad_platform_remove(struct platform_device *pdev) static const struct dev_pm_ops tegra186_arad_pm_ops = { SET_RUNTIME_PM_OPS(tegra186_arad_runtime_suspend, tegra186_arad_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(tegra186_arad_suspend, NULL) + SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra186_arad_suspend, + tegra186_arad_resume) }; static struct platform_driver tegra186_arad_driver = { diff --git a/sound/soc/tegra-alt/tegra186_asrc_alt.c b/sound/soc/tegra-alt/tegra186_asrc_alt.c index dad8016f..136f1cd0 100644 --- a/sound/soc/tegra-alt/tegra186_asrc_alt.c +++ b/sound/soc/tegra-alt/tegra186_asrc_alt.c @@ -229,7 +229,18 @@ static int tegra186_asrc_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra186_asrc_suspend(struct device *dev) { - return 0; + if (pm_runtime_status_suspended(dev)) + return 0; + + return tegra186_asrc_runtime_suspend(dev); +} + +static int tegra186_asrc_resume(struct device *dev) +{ + if (pm_runtime_status_suspended(dev)) + return 0; + + return tegra186_asrc_runtime_resume(dev); } #endif @@ -1252,7 +1263,8 @@ static int tegra186_asrc_platform_remove(struct platform_device *pdev) static const struct dev_pm_ops tegra186_asrc_pm_ops = { SET_RUNTIME_PM_OPS(tegra186_asrc_runtime_suspend, tegra186_asrc_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(tegra186_asrc_suspend, NULL) + SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra186_asrc_suspend, + tegra186_asrc_resume) }; static struct platform_driver tegra186_asrc_driver = { diff --git a/sound/soc/tegra-alt/tegra186_dspk_alt.c b/sound/soc/tegra-alt/tegra186_dspk_alt.c index 7a074cc0..c02a4651 100644 --- a/sound/soc/tegra-alt/tegra186_dspk_alt.c +++ b/sound/soc/tegra-alt/tegra186_dspk_alt.c @@ -141,7 +141,18 @@ static int tegra186_dspk_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra186_dspk_suspend(struct device *dev) { - return 0; + if (pm_runtime_status_suspended(dev)) + return 0; + + return tegra186_dspk_runtime_suspend(dev); +} + +static int tegra186_dspk_resume(struct device *dev) +{ + if (pm_runtime_status_suspended(dev)) + return 0; + + return tegra186_dspk_runtime_resume(dev); } #endif @@ -625,7 +636,8 @@ static int tegra186_dspk_platform_remove(struct platform_device *pdev) static const struct dev_pm_ops tegra186_dspk_pm_ops = { SET_RUNTIME_PM_OPS(tegra186_dspk_runtime_suspend, tegra186_dspk_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(tegra186_dspk_suspend, NULL) + SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra186_dspk_suspend, + tegra186_dspk_resume) }; static struct platform_driver tegra186_dspk_driver = {