Skip to content

Commit

Permalink
platform/x86: amd-pmc: only use callbacks for suspend
Browse files Browse the repository at this point in the history
This driver is intended to be used exclusively for suspend to idle
so callbacks to send OS_HINT during hibernate and S5 will set OS_HINT
at the wrong time leading to an undefined behavior.

Cc: stable@vger.kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20211210143529.10594-1-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Mario Limonciello authored and Hans de Goede committed Dec 21, 2021
1 parent 804034c commit 09fc140
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/platform/x86/amd-pmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,8 @@ static int __maybe_unused amd_pmc_resume(struct device *dev)
}

static const struct dev_pm_ops amd_pmc_pm_ops = {
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(amd_pmc_suspend, amd_pmc_resume)
.suspend_noirq = amd_pmc_suspend,
.resume_noirq = amd_pmc_resume,
};

static const struct pci_device_id pmc_pci_ids[] = {
Expand Down

0 comments on commit 09fc140

Please sign in to comment.