Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / drivers / char / apm-emulation.c
index f4837a893dfad64dcd0f49b5a73fb61f76b948b6..46118f8459484a35c3a709c12a28512fd56820af 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/kthread.h>
 #include <linux/delay.h>
 
-#include <asm/system.h>
 
 /*
  * The apm_bios device is one of the misc char devices.
@@ -302,7 +301,7 @@ apm_ioctl(struct file *filp, u_int cmd, u_long arg)
                         * anything critical, chill a bit on each iteration.
                         */
                        while (wait_event_freezable(apm_suspend_waitqueue,
-                                       as->suspend_state == SUSPEND_DONE))
+                                       as->suspend_state != SUSPEND_ACKED))
                                msleep(10);
                        break;
                case SUSPEND_ACKTO: