diff --git a/drivers/amlogic/pm/gx_pm.c b/drivers/amlogic/pm/gx_pm.c index d012ff1ba8ce..8228001d15b3 100644 --- a/drivers/amlogic/pm/gx_pm.c +++ b/drivers/amlogic/pm/gx_pm.c @@ -41,6 +41,7 @@ #include #include #include <../kernel/power/power.h> +#include typedef unsigned long (psci_fn)(unsigned long, unsigned long, unsigned long, unsigned long); @@ -157,6 +158,8 @@ ssize_t suspend_reason_show(struct device *dev, struct device_attribute *attr, { unsigned int len; + if (scpi_get_wakeup_reason(&suspend_reason)) + return -EPERM; len = sprintf(buf, "%d\n", suspend_reason); return len;