Pull asus into release branch
[pandora-kernel.git] / drivers / macintosh / smu.c
index 6dde27a..c9f3dc4 100644 (file)
@@ -945,7 +945,7 @@ static struct smu_sdbp_header *smu_create_sdb_partition(int id)
         */
        tlen = sizeof(struct property) + len + 18;
 
-       prop = kcalloc(tlen, 1, GFP_KERNEL);
+       prop = kzalloc(tlen, GFP_KERNEL);
        if (prop == NULL)
                return NULL;
        hdr = (struct smu_sdbp_header *)(prop + 1);
@@ -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);
@@ -1277,7 +1277,7 @@ static int smu_release(struct inode *inode, struct file *file)
 }
 
 
-static struct file_operations smu_device_fops = {
+static const struct file_operations smu_device_fops = {
        .llseek         = no_llseek,
        .read           = smu_read,
        .write          = smu_write,