patch-2.4.10 linux/drivers/sound/dmasound/dmasound_paula.c
Next file: linux/drivers/sound/dmasound/dmasound_q40.c
Previous file: linux/drivers/sound/dmasound/dmasound_awacs.c
Back to the patch index
Back to the overall index
- Lines: 53
- Date:
Mon Sep 10 09:09:49 2001
- Orig file:
v2.4.9/linux/drivers/sound/dmasound/dmasound_paula.c
- Orig date:
Mon Aug 27 12:41:45 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/sound/dmasound/dmasound_paula.c linux/drivers/sound/dmasound/dmasound_paula.c
@@ -155,14 +155,14 @@
if (!dmasound.soft.stereo) {
void *p = &frame[*frameUsed];
- count = min(unsigned long, 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(unsigned long, 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(unsigned long, 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(unsigned long, 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(unsigned long, 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(unsigned long, 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)++)) \
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)