]> git.neil.brown.name Git - history.git/commitdiff
[ARM] Don't sleep in cpufreq code if IRQs are disabled (during resume.)
authorRussell King <rmk@flint.arm.linux.org.uk>
Fri, 5 Sep 2003 18:10:57 +0000 (19:10 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Fri, 5 Sep 2003 18:10:57 +0000 (19:10 +0100)
arch/arm/mach-sa1100/cpu-sa1110.c

index 87a0d789e34adaf3d18a561ad7e281e5a085c2e7..edb5eb8c9cd5a06f24e376beb272507f27595fe6 100644 (file)
@@ -270,8 +270,12 @@ static int sa1110_target(struct cpufreq_policy *policy,
         * We wait 20ms to be safe.
         */
        sdram_set_refresh(2);
-       set_current_state(TASK_UNINTERRUPTIBLE);
-       schedule_timeout(20 * HZ / 1000);
+       if (!irqs_disabled()) {
+               set_current_state(TASK_UNINTERRUPTIBLE);
+               schedule_timeout(20 * HZ / 1000);
+       } else {
+               mdelay(20);
+       }
 
        /*
         * Reprogram the DRAM timings with interrupts disabled, and