Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2946,20 +2946,6 @@ static int hda_codec_runtime_resume(struct device *dev)
#endif /* CONFIG_PM */

#ifdef CONFIG_PM_SLEEP
static int hda_codec_force_resume(struct device *dev)
{
int ret;

/* The get/put pair below enforces the runtime resume even if the
* device hasn't been used at suspend time. This trick is needed to
* update the jack state change during the sleep.
*/
pm_runtime_get_noresume(dev);
ret = pm_runtime_force_resume(dev);
pm_runtime_put(dev);
return ret;
}

static int hda_codec_pm_suspend(struct device *dev)
{
dev->power.power_state = PMSG_SUSPEND;
Expand All @@ -2969,7 +2955,7 @@ static int hda_codec_pm_suspend(struct device *dev)
static int hda_codec_pm_resume(struct device *dev)
{
dev->power.power_state = PMSG_RESUME;
return hda_codec_force_resume(dev);
return pm_runtime_force_resume(dev);
}

static int hda_codec_pm_freeze(struct device *dev)
Expand All @@ -2981,13 +2967,13 @@ static int hda_codec_pm_freeze(struct device *dev)
static int hda_codec_pm_thaw(struct device *dev)
{
dev->power.power_state = PMSG_THAW;
return hda_codec_force_resume(dev);
return pm_runtime_force_resume(dev);
}

static int hda_codec_pm_restore(struct device *dev)
{
dev->power.power_state = PMSG_RESTORE;
return hda_codec_force_resume(dev);
return pm_runtime_force_resume(dev);
}
#endif /* CONFIG_PM_SLEEP */

Expand Down