]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/macintosh/smu.c
IB/ipath: Force PIOAvail update entry point
[linux-2.6-omap-h63xx.git] / drivers / macintosh / smu.c
index 3096836d8bd3309e35b459d2684b6688838ff58e..c9f3dc4fd3ee47a567d8087e9064efd55cf078bd 100644 (file)
@@ -1259,9 +1259,9 @@ static int smu_release(struct inode *inode, struct file *file)
                        set_current_state(TASK_UNINTERRUPTIBLE);
                        if (pp->cmd.status != 1)
                                break;
-                       spin_lock_irqsave(&pp->lock, flags);
-                       schedule();
                        spin_unlock_irqrestore(&pp->lock, flags);
+                       schedule();
+                       spin_lock_irqsave(&pp->lock, flags);
                }
                set_current_state(TASK_RUNNING);
                remove_wait_queue(&pp->wait, &wait);