summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/spufs/file.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-10-17 05:02:31 +0400
committerJeremy Kerr <jk@ozlabs.org>2008-10-21 04:13:54 +0400
commit837ef884b702edd1c4514eaed1dbecd48721bd22 (patch)
treec60fbf1343004cf883912aef9fd7741ec3b90c3f /arch/powerpc/platforms/cell/spufs/file.c
parentf027faa231f38c02e949352735eac76f29090809 (diff)
downloadlinux-837ef884b702edd1c4514eaed1dbecd48721bd22.tar.xz
powerpc/spufs: Use kmalloc rather than kzalloc for switch log buffer
No need to zero the entire buffer, just the head and tail indices. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/file.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index b6f7b917b56c..b73c369cc6f1 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -2442,7 +2442,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file)
goto out;
}
- ctx->switch_log = kzalloc(sizeof(struct switch_log) +
+ ctx->switch_log = kmalloc(sizeof(struct switch_log) +
SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry),
GFP_KERNEL);
@@ -2451,6 +2451,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file)
goto out;
}
+ ctx->switch_log->head = ctx->switch_log->tail = 0;
init_waitqueue_head(&ctx->switch_log->wait);
rc = 0;