lkml.org 
[lkml]   [2022]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 09/10] HID: I2C-HID: Use `pm_suspend_preferred_s2idle`
Date
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 --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);
}
--
2.34.1
\
 
 \ /
  Last update: 2022-07-01 04:36    [W:0.152 / U:1.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site