patch-2.4.27 linux-2.4.27/drivers/sound/msnd.c
Next file: linux-2.4.27/drivers/sound/msnd.h
Previous file: linux-2.4.27/drivers/sound/mpu401.c
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
2004-08-07 16:26:05.559383964 -0700
- Orig file:
linux-2.4.26/drivers/sound/msnd.c
- Orig date:
2001-09-30 12:26:08.000000000 -0700
diff -urN linux-2.4.26/drivers/sound/msnd.c linux-2.4.27/drivers/sound/msnd.c
@@ -155,13 +155,10 @@
f->len = f->tail = f->head = 0;
}
-int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len, int user)
+int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len)
{
int count = 0;
- if (f->len == f->n)
- return 0;
-
while ((count < len) && (f->len != f->n)) {
int nwritten;
@@ -177,11 +174,7 @@
nwritten = len - count;
}
- if (user) {
- if (copy_from_user(f->data + f->tail, buf, nwritten))
- return -EFAULT;
- } else
- isa_memcpy_fromio(f->data + f->tail, (unsigned long) buf, nwritten);
+ isa_memcpy_fromio(f->data + f->tail, (unsigned long) buf, nwritten);
count += nwritten;
buf += nwritten;
@@ -193,13 +186,10 @@
return count;
}
-int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len, int user)
+int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len)
{
int count = 0;
- if (f->len == 0)
- return f->len;
-
while ((count < len) && (f->len > 0)) {
int nread;
@@ -215,11 +205,7 @@
nread = len - count;
}
- if (user) {
- if (copy_to_user(buf, f->data + f->head, nread))
- return -EFAULT;
- } else
- isa_memcpy_toio((unsigned long) buf, f->data + f->head, nread);
+ isa_memcpy_toio((unsigned long) buf, f->data + f->head, nread);
count += nread;
buf += nread;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)