Unverified Commit be69fb5f authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15019 platform/x86/amd/pmc: Only disable IRQ1 wakeup where i8042 actually enabled it

parents 34bea3c3 61f1b7e6
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -878,6 +878,10 @@ static int amd_pmc_suspend_handler(struct device *dev)
{
	struct amd_pmc_dev *pdev = dev_get_drvdata(dev);

	/*
	 * Must be called only from the same set of dev_pm_ops handlers
	 * as i8042_pm_suspend() is called: currently just from .suspend.
	 */
	if (pdev->disable_8042_wakeup && !disable_workarounds) {
		int rc = amd_pmc_wa_irq1(pdev);

@@ -890,7 +894,9 @@ static int amd_pmc_suspend_handler(struct device *dev)
	return 0;
}

static DEFINE_SIMPLE_DEV_PM_OPS(amd_pmc_pm, amd_pmc_suspend_handler, NULL);
static const struct dev_pm_ops amd_pmc_pm = {
	.suspend = amd_pmc_suspend_handler,
};

static const struct pci_device_id pmc_pci_ids[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_PS) },