X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmacintosh%2Fsmu.c;h=c9f3dc4fd3ee47a567d8087e9064efd55cf078bd;hb=eaf60d6924759eb2a249c0b568533a90c238061b;hp=6dde27ab79a817a1c9899eac5a319754e8d8f534;hpb=11c302c14d8ddc47504bd3b650bc9e8da7c717b7;p=pandora-kernel.git diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 6dde27ab79a8..c9f3dc4fd3ee 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c @@ -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,