]> err.no Git - linux-2.6/blobdiff - sound/oss/dmasound/dmasound_paula.c
[PATCH] m68k: dmasound_paula.c lvalues abuse (from m68k CVS)
[linux-2.6] / sound / oss / dmasound / dmasound_paula.c
index d59f60b2641096119a898f67319812aac988b6e4..541781507e6364c75b153ded01302b9f2e485fbf 100644 (file)
@@ -34,6 +34,7 @@
 #define DMASOUND_PAULA_REVISION 0
 #define DMASOUND_PAULA_EDITION 4
 
+#define custom amiga_custom
    /*
     *  The minimum period for audio depends on htotal (for OCS/ECS/AGA)
     *  (Imported from arch/m68k/amiga/amisound.c)
@@ -244,6 +245,7 @@ static ssize_t funcname(const u_char *userPtr, size_t userCount,    \
                        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 +255,7 @@ static ssize_t funcname(const u_char *userPtr, size_t userCount,    \
                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 +270,12 @@ static ssize_t funcname(const u_char *userPtr, size_t userCount,  \
                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;                            \