diff mbox series

[v3,09/10] HID: I2C-HID: Use `pm_suspend_preferred_s2idle`

Message ID 20220701023328.2783-9-mario.limonciello@amd.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show
Series None | expand

Commit Message

Mario Limonciello July 1, 2022, 2:33 a.m. UTC
Drop the direct check from the FADT and use the helper instead.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/hid/i2c-hid/i2c-hid-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/hid/i2c-hid/i2c-hid-acpi.c b/drivers/hid/i2c-hid/i2c-hid-acpi.c
index b96ae15e0ad9..84d51f309c53 100644
--- a/drivers/hid/i2c-hid/i2c-hid-acpi.c
+++ b/drivers/hid/i2c-hid/i2c-hid-acpi.c
@@ -105,7 +105,7 @@  static int i2c_hid_acpi_probe(struct i2c_client *client)
 
 	acpi_device_fix_up_power(adev);
 
-	if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
+	if (pm_suspend_preferred_s2idle()) {
 		device_set_wakeup_capable(dev, true);
 		device_set_wakeup_enable(dev, false);
 	}