Added dmasound_paula.c apus patch.

svn path=/dists/trunk/linux-2.6/; revision=4277
This commit is contained in:
Sven Luther 2005-09-25 19:55:18 +00:00
parent c852f8e419
commit e2d83f2e8a
1 changed files with 34 additions and 0 deletions

View File

@ -3030,3 +3030,37 @@ diff -Nur -x CVS linux-2.6.13/include/video/vga.h linux-2.6.13-apus/include/vide
#undef inb_p
#undef inw_p
#undef outb_p
--- linux-2.6.13/sound/oss/dmasound/dmasound_paula.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13-apus/sound/oss/dmasound/dmasound_paula.c 2005-09-25 21:50:11.000000000 +0200
@@ -244,6 +244,7 @@
u_char frame[], ssize_t *frameUsed, \
ssize_t frameLeft) \
{ \
+ const u_short *ptr = (const u_short *)userPtr; \
ssize_t count, used; \
u_short data; \
\
@@ -253,7 +254,7 @@
count = min_t(size_t, userCount, frameLeft)>>1 & ~1; \
used = count*2; \
while (count > 0) { \
- if (get_user(data, ((u_short *)userPtr)++)) \
+ if (get_user(data, ptr++)) \
return -EFAULT; \
data = convsample(data); \
*high++ = data>>8; \
@@ -268,12 +269,12 @@
count = min_t(size_t, userCount, frameLeft)>>2 & ~1; \
used = count*4; \
while (count > 0) { \
- if (get_user(data, ((u_short *)userPtr)++)) \
+ if (get_user(data, ptr++)) \
return -EFAULT; \
data = convsample(data); \
*lefth++ = data>>8; \
*leftl++ = (data>>2) & 0x3f; \
- if (get_user(data, ((u_short *)userPtr)++)) \
+ if (get_user(data, ptr++)) \
return -EFAULT; \
data = convsample(data); \
*righth++ = data>>8; \