Merge tag 'gpio-fixes-for-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / drivers / gpio / gpiolib-acpi.c
index 9ef0f5641b52182808359eb3b3274557886b6af6..17c53f484280f086d46cb95bf2dd22a978cd96e8 100644 (file)
@@ -1104,7 +1104,8 @@ int acpi_dev_gpio_irq_wake_get_by(struct acpi_device *adev, const char *name, in
                                dev_dbg(&adev->dev, "IRQ %d already in use\n", irq);
                        }
 
-                       if (wake_capable)
+                       /* avoid suspend issues with GPIOs when systems are using S3 */
+                       if (wake_capable && acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)
                                *wake_capable = info.wake_capable;
 
                        return irq;