git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
patch-2_6_7-vs1_9_1_12
[linux-2.6.git]
/
sound
/
oss
/
msnd.c
diff --git
a/sound/oss/msnd.c
b/sound/oss/msnd.c
index
deb126d
..
6ccdd09
100644
(file)
--- a/
sound/oss/msnd.c
+++ b/
sound/oss/msnd.c
@@
-59,9
+59,6
@@
int __init msnd_register(multisound_dev_t *dev)
devs[i] = dev;
++num_devs;
devs[i] = dev;
++num_devs;
-
- MOD_INC_USE_COUNT;
-
return 0;
}
return 0;
}
@@
-80,8
+77,6
@@
void msnd_unregister(multisound_dev_t *dev)
devs[i] = NULL;
--num_devs;
devs[i] = NULL;
--num_devs;
-
- MOD_DEC_USE_COUNT;
}
int msnd_get_num_devs(void)
}
int msnd_get_num_devs(void)
@@
-144,13
+139,10
@@
void msnd_fifo_make_empty(msnd_fifo *f)
f->len = f->tail = f->head = 0;
}
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;
{
int count = 0;
- if (f->len == f->n)
- return 0;
-
while ((count < len) && (f->len != f->n)) {
int nwritten;
while ((count < len) && (f->len != f->n)) {
int nwritten;
@@
-166,11
+158,7
@@
int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len, int user)
nwritten = len - count;
}
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;
count += nwritten;
buf += nwritten;
@@
-182,13
+170,10
@@
int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len, int user)
return count;
}
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;
{
int count = 0;
- if (f->len == 0)
- return f->len;
-
while ((count < len) && (f->len > 0)) {
int nread;
while ((count < len) && (f->len > 0)) {
int nread;
@@
-204,11
+189,7
@@
int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len, int user)
nread = len - count;
}
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;
count += nread;
buf += nread;