]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'apm/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 Sep 2011 06:55:14 +0000 (16:55 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 Sep 2011 06:55:14 +0000 (16:55 +1000)
1  2 
drivers/char/apm-emulation.c

index ae6a9330632528fa38421165456531bd73b6a77c,7e2709c35fcf2f0a9d6b5dd55b24ce90b43722c5..f4837a893dfad64dcd0f49b5a73fb61f76b948b6
  #define APM_MINOR_DEV 134
  
  /*
 - * See Documentation/Config.help for the configuration options.
 - *
 - * Various options can be changed at boot time as follows:
 - * (We allow underscores for compatibility with the modules code)
 + * One option can be changed at boot time as follows:
   *    apm=on/off                      enable/disable APM
   */
  
@@@ -297,17 -300,13 +297,13 @@@ apm_ioctl(struct file *filp, u_int cmd
                        /*
                         * Wait for the suspend/resume to complete.  If there
                         * are pending acknowledges, we wait here for them.
+                        * wait_event_freezable() is interruptible and pending
+                        * signal can cause busy looping.  We aren't doing
+                        * anything critical, chill a bit on each iteration.
                         */
-                       freezer_do_not_count();
-                       wait_event(apm_suspend_waitqueue,
-                                  as->suspend_state == SUSPEND_DONE);
-                       /*
-                        * Since we are waiting until the suspend is done, the
-                        * try_to_freeze() in freezer_count() will not trigger
-                        */
-                       freezer_count();
+                       while (wait_event_freezable(apm_suspend_waitqueue,
+                                       as->suspend_state == SUSPEND_DONE))
+                               msleep(10);
                        break;
                case SUSPEND_ACKTO:
                        as->suspend_result = -ETIMEDOUT;
@@@ -603,7 -602,7 +599,7 @@@ static int apm_suspend_notifier(struct 
                        return NOTIFY_OK;
  
                /* interrupted by signal */
 -              return NOTIFY_BAD;
 +              return notifier_from_errno(err);
  
        case PM_POST_SUSPEND:
                /*