Update of /cvsroot/alsa/alsa-kernel/pci/cs46xx
In directory sc8-pr-cvs1:/tmp/cvs-serv12073/cs46xx
Modified Files:
cs46xx_lib.c
Log Message:
- fixed compile warnings with cast for memcpy_fromio/toio.
- use copy_to_user_fromio() in proc output.
Index: cs46xx_lib.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cs46xx/cs46xx_lib.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- cs46xx_lib.c 23 Sep 2003 14:31:44 -0000 1.64
+++ cs46xx_lib.c 14 Oct 2003 14:08:49 -0000 1.65
@@ -2849,23 +2849,11 @@
if (file->f_pos + (size_t)size > region->size)
size = region->size - file->f_pos;
if (size > 0) {
- char *tmp;
- long res;
- unsigned long virt;
- if ((tmp = kmalloc(size, GFP_KERNEL)) == NULL)
- return -ENOMEM;
- virt = region->remap_addr + file->f_pos;
- memcpy_fromio(tmp, virt, size);
- if (copy_to_user(buf, tmp, size))
- res = -EFAULT;
- else {
- res = size;
- file->f_pos += size;
- }
- kfree(tmp);
- return res;
+ if (copy_to_user_fromio(buf, region->remap_addr + file->f_pos, size))
+ return -EFAULT;
+ file->f_pos += size;
}
- return 0;
+ return size;
}
static struct snd_info_entry_ops snd_cs46xx_proc_io_ops = {
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog