Update of /cvsroot/alsa/alsa-kernel/drivers/opl4 In directory sc8-pr-cvs1:/tmp/cvs-serv3501
Modified Files: opl4_proc.c Log Message: Clemens Ladisch <[EMAIL PROTECTED]> use vmalloc instead of kmalloc for temp buffer in proc read()/write() Index: opl4_proc.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/drivers/opl4/opl4_proc.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- opl4_proc.c 23 May 2003 11:15:12 -0000 1.1 +++ opl4_proc.c 3 Nov 2003 10:30:47 -0000 1.2 @@ -18,6 +18,7 @@ */ #include "opl4_local.h" +#include <linux/vmalloc.h> #include <sound/info.h> #ifdef CONFIG_PROC_FS @@ -59,7 +60,7 @@ if (file->f_pos + size > entry->size) size = entry->size - file->f_pos; if (size > 0) { - buf = kmalloc(size, GFP_KERNEL); + buf = vmalloc(size); if (!buf) return -ENOMEM; snd_opl4_read_memory(opl4, buf, file->f_pos, size); @@ -67,7 +68,7 @@ kfree(buf); return -EFAULT; } - kfree(buf); + vfree(buf); file->f_pos += size; return size; } @@ -85,7 +86,7 @@ if (file->f_pos + size > entry->size) size = entry->size - file->f_pos; if (size > 0) { - buf = kmalloc(size, GFP_KERNEL); + buf = vmalloc(size); if (!buf) return -ENOMEM; if (copy_from_user(buf, _buf, size)) { @@ -93,7 +94,7 @@ return -EFAULT; } snd_opl4_write_memory(opl4, buf, file->f_pos, size); - kfree(buf); + vfree(buf); file->f_pos += size; return size; } ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog