Update of /cvsroot/linux-vax/kernel-2.4/drivers/sound/dmasound
In directory usw-pr-cvs1:/tmp/cvs-serv12946/sound/dmasound
Modified Files:
dmasound.h dmasound_atari.c dmasound_awacs.c dmasound_core.c
dmasound_paula.c dmasound_q40.c
Log Message:
synch 2.4.15 commit 54
Index: dmasound.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sound/dmasound/dmasound.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dmasound.h 14 Jan 2001 18:35:11 -0000 1.1.1.1
+++ dmasound.h 11 Apr 2002 13:26:50 -0000 1.2
@@ -47,7 +47,6 @@
#define MAX_BUFSIZE 128 /* Limit for Amiga in KB */
-#define min(x, y) ((x) < (y) ? (x) : (y))
#define le2be16(x) (((x)<<8 & 0xff00) | ((x)>>8 & 0x00ff))
#define le2be16dbl(x) (((x)<<8 & 0xff00ff00) | ((x)>>8 & 0x00ff00ff))
Index: dmasound_atari.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sound/dmasound/dmasound_atari.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dmasound_atari.c 14 Jan 2001 18:35:16 -0000 1.1.1.1
+++ dmasound_atari.c 11 Apr 2002 13:26:50 -0000 1.2
@@ -154,7 +154,7 @@
ssize_t count, used;
u_char *p = &frame[*frameUsed];
- count = min(userCount, frameLeft);
+ count = min_t(unsigned long, userCount, frameLeft);
if (dmasound.soft.stereo)
count &= ~1;
used = count;
@@ -177,7 +177,7 @@
ssize_t count, used;
void *p = &frame[*frameUsed];
- count = min(userCount, frameLeft);
+ count = min_t(unsigned long, userCount, frameLeft);
if (dmasound.soft.stereo)
count &= ~1;
used = count;
@@ -196,7 +196,7 @@
if (!dmasound.soft.stereo) {
u_char *p = &frame[*frameUsed];
- count = min(userCount, frameLeft);
+ count = min_t(unsigned long, userCount, frameLeft);
used = count;
while (count > 0) {
u_char data;
@@ -207,7 +207,7 @@
}
} else {
u_short *p = (u_short *)&frame[*frameUsed];
- count = min(userCount, frameLeft)>>1;
+ count = min_t(unsigned long, userCount, frameLeft)>>1;
used = count*2;
while (count > 0) {
u_short data;
@@ -230,7 +230,7 @@
if (!dmasound.soft.stereo) {
u_short *p = (u_short *)&frame[*frameUsed];
- count = min(userCount, frameLeft)>>1;
+ count = min_t(unsigned long, userCount, frameLeft)>>1;
used = count*2;
while (count > 0) {
u_short data;
@@ -243,7 +243,7 @@
*frameUsed += used*2;
} else {
void *p = (u_short *)&frame[*frameUsed];
- count = min(userCount, frameLeft) & ~3;
+ count = min_t(unsigned long, userCount, frameLeft) & ~3;
used = count;
if (copy_from_user(p, userPtr, count))
return -EFAULT;
@@ -261,7 +261,7 @@
if (!dmasound.soft.stereo) {
u_short *p = (u_short *)&frame[*frameUsed];
- count = min(userCount, frameLeft)>>1;
+ count = min_t(unsigned long, userCount, frameLeft)>>1;
used = count*2;
while (count > 0) {
u_short data;
@@ -275,7 +275,7 @@
*frameUsed += used*2;
} else {
u_long *p = (u_long *)&frame[*frameUsed];
- count = min(userCount, frameLeft)>>2;
+ count = min_t(unsigned long, userCount, frameLeft)>>2;
used = count*4;
while (count > 0) {
u_long data;
@@ -299,7 +299,7 @@
count = frameLeft;
if (!dmasound.soft.stereo) {
u_short *p = (u_short *)&frame[*frameUsed];
- count = min(userCount, frameLeft)>>1;
+ count = min_t(unsigned long, userCount, frameLeft)>>1;
used = count*2;
while (count > 0) {
u_short data;
@@ -313,7 +313,7 @@
*frameUsed += used*2;
} else {
u_long *p = (u_long *)&frame[*frameUsed];
- count = min(userCount, frameLeft)>>2;
+ count = min_t(unsigned long, userCount, frameLeft)>>2;
used = count*4;
while (count > 0) {
u_long data;
@@ -338,7 +338,7 @@
count = frameLeft;
if (!dmasound.soft.stereo) {
u_short *p = (u_short *)&frame[*frameUsed];
- count = min(userCount, frameLeft)>>1;
+ count = min_t(unsigned long, userCount, frameLeft)>>1;
used = count*2;
while (count > 0) {
u_short data;
@@ -351,7 +351,7 @@
*frameUsed += used*2;
} else {
u_long *p = (u_long *)&frame[*frameUsed];
- count = min(userCount, frameLeft)>>2;
+ count = min_t(unsigned long, userCount, frameLeft)>>2;
used = count;
while (count > 0) {
u_long data;
@@ -1559,3 +1559,4 @@
module_init(dmasound_atari_init);
module_exit(dmasound_atari_cleanup);
+MODULE_LICENSE("GPL");
Index: dmasound_awacs.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sound/dmasound/dmasound_awacs.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- dmasound_awacs.c 25 Feb 2001 23:15:09 -0000 1.1.1.2
+++ dmasound_awacs.c 11 Apr 2002 13:26:50 -0000 1.2
@@ -267,7 +267,7 @@
frameLeft >>= 2;
if (stereo)
userCount >>= 1;
- used = count = min(userCount, frameLeft);
+ used = count = min_t(unsigned long, userCount, frameLeft);
while (count > 0) {
u_char data;
if (get_user(data, userPtr++))
@@ -298,7 +298,7 @@
frameLeft >>= 2;
if (stereo)
userCount >>= 1;
- used = count = min(userCount, frameLeft);
+ used = count = min_t(unsigned long, userCount, frameLeft);
while (count > 0) {
u_char data;
if (get_user(data, userPtr++))
@@ -329,7 +329,7 @@
frameLeft >>= 2;
if (stereo)
userCount >>= 1;
- used = count = min(userCount, frameLeft);
+ used = count = min_t(unsigned long, userCount, frameLeft);
while (count > 0) {
u_char data;
if (get_user(data, userPtr++))
@@ -359,7 +359,7 @@
frameLeft >>= 2;
userCount >>= (stereo? 2: 1);
- used = count = min(userCount, frameLeft);
+ used = count = min_t(unsigned long, userCount, frameLeft);
if (!stereo) {
short *up = (short *) userPtr;
while (count > 0) {
@@ -390,7 +390,7 @@
frameLeft >>= 2;
userCount >>= (stereo? 2: 1);
- used = count = min(userCount, frameLeft);
+ used = count = min_t(unsigned long, userCount, frameLeft);
while (count > 0) {
int data;
if (get_user(data, up++))
@@ -648,7 +648,7 @@
frameLeft >>= 2;
if (stereo)
userCount >>= 1;
- used = count = min(userCount, frameLeft);
+ used = count = min_t(unsigned long, userCount, frameLeft);
while (count > 0) {
u_char data;
@@ -681,7 +681,7 @@
frameLeft >>= 2;
if (stereo)
userCount >>= 1;
- used = count = min(userCount, frameLeft);
+ used = count = min_t(unsigned long, userCount, frameLeft);
while (count > 0) {
u_char data;
@@ -713,7 +713,7 @@
frameLeft >>= 2;
userCount >>= (stereo? 2: 1);
- used = count = min(userCount, frameLeft);
+ used = count = min_t(unsigned long, userCount, frameLeft);
if (!stereo) {
short *up = (short *) userPtr;
while (count > 0) {
@@ -744,7 +744,7 @@
frameLeft >>= 2;
userCount >>= (stereo? 2: 1);
- used = count = min(userCount, frameLeft);
+ used = count = min_t(unsigned long, userCount, frameLeft);
while (count > 0) {
int data;
@@ -2180,3 +2180,4 @@
module_init(dmasound_awacs_init);
module_exit(dmasound_awacs_cleanup);
+MODULE_LICENSE("GPL");
Index: dmasound_core.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sound/dmasound/dmasound_core.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- dmasound_core.c 25 Feb 2001 23:15:09 -0000 1.1.1.2
+++ dmasound_core.c 11 Apr 2002 13:26:50 -0000 1.2
@@ -135,6 +135,7 @@
MODULE_PARM(writeBufSize, "i");
MODULE_PARM(numReadBufs, "i");
MODULE_PARM(readBufSize, "i");
+MODULE_LICENSE("GPL");
#ifdef MODULE
static int sq_unit = -1;
@@ -385,16 +386,6 @@
/*
- * Common stuff
- */
-
-static long long sound_lseek(struct file *file, long long offset, int orig)
-{
- return -ESPIPE;
-}
-
-
- /*
* Mid level stuff
*/
@@ -536,7 +527,7 @@
static struct file_operations mixer_fops =
{
owner: THIS_MODULE,
- llseek: sound_lseek,
+ llseek: no_llseek,
ioctl: mixer_ioctl,
open: mixer_open,
release: mixer_release,
@@ -1036,7 +1027,7 @@
static struct file_operations sq_fops =
{
owner: THIS_MODULE,
- llseek: sound_lseek,
+ llseek: no_llseek,
write: sq_write,
ioctl: sq_ioctl,
open: sq_open,
@@ -1174,7 +1165,7 @@
static struct file_operations state_fops = {
owner: THIS_MODULE,
- llseek: sound_lseek,
+ llseek: no_llseek,
read: state_read,
open: state_open,
release: state_release,
Index: dmasound_paula.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sound/dmasound/dmasound_paula.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dmasound_paula.c 14 Jan 2001 18:35:31 -0000 1.1.1.1
+++ dmasound_paula.c 11 Apr 2002 13:26:50 -0000 1.2
@@ -155,14 +155,14 @@
if (!dmasound.soft.stereo) {
void *p = &frame[*frameUsed];
- count = min(userCount, frameLeft) & ~1;
+ count = min_t(unsigned long, userCount, frameLeft) & ~1;
used = count;
if (copy_from_user(p, userPtr, count))
return -EFAULT;
} else {
u_char *left = &frame[*frameUsed>>1];
u_char *right = left+write_sq_block_size_half;
- count = min(userCount, frameLeft)>>1 & ~1;
+ count = min_t(unsigned long, userCount, frameLeft)>>1 & ~1;
used = count*2;
while (count > 0) {
if (get_user(*left++, userPtr++)
@@ -189,7 +189,7 @@
\
if (!dmasound.soft.stereo) { \
u_char *p = &frame[*frameUsed]; \
- count = min(userCount, frameLeft) & ~1; \
+ count = min_t(size_t, userCount, frameLeft) & ~1; \
used = count; \
while (count > 0) { \
u_char data; \
@@ -201,7 +201,7 @@
} else { \
u_char *left = &frame[*frameUsed>>1]; \
u_char *right = left+write_sq_block_size_half; \
- count = min(userCount, frameLeft)>>1 & ~1; \
+ count = min_t(size_t, userCount, frameLeft)>>1 & ~1; \
used = count*2; \
while (count > 0) { \
u_char data; \
@@ -242,7 +242,7 @@
if (!dmasound.soft.stereo) { \
u_char *high = &frame[*frameUsed>>1]; \
u_char *low = high+write_sq_block_size_half; \
- count = min(userCount, frameLeft)>>1 & ~1; \
+ count = min_t(size_t, userCount, frameLeft)>>1 & ~1; \
used = count*2; \
while (count > 0) { \
if (get_user(data, ((u_short *)userPtr)++)) \
@@ -257,7 +257,7 @@
u_char *leftl = lefth+write_sq_block_size_quarter; \
u_char *righth = lefth+write_sq_block_size_half; \
u_char *rightl = righth+write_sq_block_size_quarter; \
- count = min(userCount, frameLeft)>>2 & ~1; \
+ count = min_t(size_t, userCount, frameLeft)>>2 & ~1; \
used = count*4; \
while (count > 0) { \
if (get_user(data, ((u_short *)userPtr)++)) \
@@ -720,3 +720,4 @@
module_init(dmasound_paula_init);
module_exit(dmasound_paula_cleanup);
+MODULE_LICENSE("GPL");
Index: dmasound_q40.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/sound/dmasound/dmasound_q40.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- dmasound_q40.c 25 Feb 2001 23:15:09 -0000 1.1.1.2
+++ dmasound_q40.c 11 Apr 2002 13:26:50 -0000 1.2
@@ -58,7 +58,7 @@
ssize_t count, used;
u_char *p = (u_char *) &frame[*frameUsed];
- used = count = min(userCount, frameLeft);
+ used = count = min_t(size_t, userCount, frameLeft);
if (copy_from_user(p,userPtr,count))
return -EFAULT;
while (count > 0) {
@@ -84,7 +84,7 @@
frameLeft >>= 1;
if (stereo)
userCount >>= 1;
- used = count = min(userCount, frameLeft);
+ used = count = min_t(size_t, userCount, frameLeft);
while (count > 0) {
u_char data;
if (get_user(data, userPtr++))
@@ -112,7 +112,7 @@
ssize_t count, used;
u_char *p = (u_char *) &frame[*frameUsed];
- used = count = min(userCount, frameLeft);
+ used = count = min_t(size_t, userCount, frameLeft);
if (copy_from_user(p,userPtr,count))
return -EFAULT;
while (count > 0) {
@@ -136,7 +136,7 @@
frameLeft >>= 1;
if (stereo)
userCount >>= 1;
- used = count = min(userCount, frameLeft);
+ used = count = min_t(size_t, userCount, frameLeft);
while (count > 0) {
u_char data;
if (get_user(data, userPtr++))
@@ -164,7 +164,7 @@
ssize_t count, used;
u_char *p = (u_char *) &frame[*frameUsed];
- used = count = min(userCount, frameLeft);
+ used = count = min_t(size_t, userCount, frameLeft);
if (copy_from_user(p,userPtr,count))
return -EFAULT;
*frameUsed += used;
@@ -184,7 +184,7 @@
frameLeft >>= 1;
if (stereo)
userCount >>= 1;
- used = count = min(userCount, frameLeft);
+ used = count = min_t(size_t, userCount, frameLeft);
while (count > 0) {
u_char data;
if (get_user(data, userPtr++))
@@ -585,3 +585,4 @@
module_init(dmasound_q40_init);
module_exit(dmasound_q40_cleanup);
+MODULE_LICENSE("GPL");
|