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>
This commit is contained in:
Jeremy Kerr 2008-10-17 12:02:31 +11:00
Родитель f027faa231
Коммит 837ef884b7
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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;