Commit 031eb4cd authored by Al Viro's avatar Al Viro Committed by Linus Torvalds
Browse files

[PATCH] m68k: dmasound __user annotations


Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d998265f
...@@ -67,46 +67,46 @@ static int expand_data; /* Data for expanding */ ...@@ -67,46 +67,46 @@ static int expand_data; /* Data for expanding */
* ++geert: split in even more functions (one per format) * ++geert: split in even more functions (one per format)
*/ */
static ssize_t ata_ct_law(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_law(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ct_s8(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_s8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_u8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_s16be(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_u16be(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_s16le(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_u16le(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ctx_law(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_law(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_s8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_u8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_s16be(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_u16be(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_s16le(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_u16le(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft); ssize_t frameLeft);
...@@ -151,7 +151,7 @@ static int FalconStateInfo(char *buffer, size_t space); ...@@ -151,7 +151,7 @@ static int FalconStateInfo(char *buffer, size_t space);
/*** Translations ************************************************************/ /*** Translations ************************************************************/
static ssize_t ata_ct_law(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_law(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -176,7 +176,7 @@ static ssize_t ata_ct_law(const u_char *userPtr, size_t userCount, ...@@ -176,7 +176,7 @@ static ssize_t ata_ct_law(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ct_s8(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_s8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -194,7 +194,7 @@ static ssize_t ata_ct_s8(const u_char *userPtr, size_t userCount, ...@@ -194,7 +194,7 @@ static ssize_t ata_ct_s8(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_u8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -217,7 +217,7 @@ static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount, ...@@ -217,7 +217,7 @@ static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount,
used = count*2; used = count*2;
while (count > 0) { while (count > 0) {
u_short data; u_short data;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
*p++ = data ^ 0x8080; *p++ = data ^ 0x8080;
...@@ -229,7 +229,7 @@ static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount, ...@@ -229,7 +229,7 @@ static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_s16be(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -241,7 +241,7 @@ static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount, ...@@ -241,7 +241,7 @@ static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount,
used = count*2; used = count*2;
while (count > 0) { while (count > 0) {
u_short data; u_short data;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
*p++ = data; *p++ = data;
...@@ -261,7 +261,7 @@ static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount, ...@@ -261,7 +261,7 @@ static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_u16be(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -273,7 +273,7 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, ...@@ -273,7 +273,7 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount,
used = count*2; used = count*2;
while (count > 0) { while (count > 0) {
u_short data; u_short data;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
data ^= 0x8000; data ^= 0x8000;
...@@ -287,8 +287,8 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, ...@@ -287,8 +287,8 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount,
count = min_t(unsigned long, userCount, frameLeft)>>2; count = min_t(unsigned long, userCount, frameLeft)>>2;
used = count*4; used = count*4;
while (count > 0) { while (count > 0) {
u_long data; u_int data;
if (get_user(data, (u_int *)userPtr)) if (get_user(data, (u_int __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4; userPtr += 4;
*p++ = data ^ 0x80008000; *p++ = data ^ 0x80008000;
...@@ -300,7 +300,7 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, ...@@ -300,7 +300,7 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_s16le(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -313,7 +313,7 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, ...@@ -313,7 +313,7 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount,
used = count*2; used = count*2;
while (count > 0) { while (count > 0) {
u_short data; u_short data;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
data = le2be16(data); data = le2be16(data);
...@@ -328,7 +328,7 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, ...@@ -328,7 +328,7 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount,
used = count*4; used = count*4;
while (count > 0) { while (count > 0) {
u_long data; u_long data;
if (get_user(data, (u_int *)userPtr)) if (get_user(data, (u_int __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4; userPtr += 4;
data = le2be16dbl(data); data = le2be16dbl(data);
...@@ -341,7 +341,7 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, ...@@ -341,7 +341,7 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, static ssize_t ata_ct_u16le(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -354,7 +354,7 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, ...@@ -354,7 +354,7 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount,
used = count*2; used = count*2;
while (count > 0) { while (count > 0) {
u_short data; u_short data;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
data = le2be16(data) ^ 0x8000; data = le2be16(data) ^ 0x8000;
...@@ -368,7 +368,7 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, ...@@ -368,7 +368,7 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount,
used = count; used = count;
while (count > 0) { while (count > 0) {
u_long data; u_long data;
if (get_user(data, (u_int *)userPtr)) if (get_user(data, (u_int __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4; userPtr += 4;
data = le2be16dbl(data) ^ 0x80008000; data = le2be16dbl(data) ^ 0x80008000;
...@@ -381,7 +381,7 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, ...@@ -381,7 +381,7 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ctx_law(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_law(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -443,7 +443,7 @@ static ssize_t ata_ctx_law(const u_char *userPtr, size_t userCount, ...@@ -443,7 +443,7 @@ static ssize_t ata_ctx_law(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_s8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -478,7 +478,7 @@ static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount, ...@@ -478,7 +478,7 @@ static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
userCount -= 2; userCount -= 2;
...@@ -497,7 +497,7 @@ static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount, ...@@ -497,7 +497,7 @@ static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_u8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -533,7 +533,7 @@ static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount, ...@@ -533,7 +533,7 @@ static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
data ^= 0x8080; data ^= 0x8080;
...@@ -553,7 +553,7 @@ static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount, ...@@ -553,7 +553,7 @@ static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_s16be(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -571,7 +571,7 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, ...@@ -571,7 +571,7 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
userCount -= 2; userCount -= 2;
...@@ -590,7 +590,7 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, ...@@ -590,7 +590,7 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 4) if (userCount < 4)
break; break;
if (get_user(data, (u_int *)userPtr)) if (get_user(data, (u_int __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4; userPtr += 4;
userCount -= 4; userCount -= 4;
...@@ -609,7 +609,7 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, ...@@ -609,7 +609,7 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_u16be(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -627,7 +627,7 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, ...@@ -627,7 +627,7 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
data ^= 0x8000; data ^= 0x8000;
...@@ -647,7 +647,7 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, ...@@ -647,7 +647,7 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 4) if (userCount < 4)
break; break;
if (get_user(data, (u_int *)userPtr)) if (get_user(data, (u_int __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4; userPtr += 4;
data ^= 0x80008000; data ^= 0x80008000;
...@@ -667,7 +667,7 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, ...@@ -667,7 +667,7 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_s16le(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -685,7 +685,7 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, ...@@ -685,7 +685,7 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
data = le2be16(data); data = le2be16(data);
...@@ -705,7 +705,7 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, ...@@ -705,7 +705,7 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 4) if (userCount < 4)
break; break;
if (get_user(data, (u_int *)userPtr)) if (get_user(data, (u_int __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4; userPtr += 4;
data = le2be16dbl(data); data = le2be16dbl(data);
...@@ -725,7 +725,7 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, ...@@ -725,7 +725,7 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount,
} }
static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, static ssize_t ata_ctx_u16le(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -743,7 +743,7 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, ...@@ -743,7 +743,7 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 2) if (userCount < 2)
break; break;
if (get_user(data, (u_short *)userPtr)) if (get_user(data, (u_short __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 2; userPtr += 2;
data = le2be16(data) ^ 0x8000; data = le2be16(data) ^ 0x8000;
...@@ -763,7 +763,7 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, ...@@ -763,7 +763,7 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount,
if (bal < 0) { if (bal < 0) {
if (userCount < 4) if (userCount < 4)
break; break;
if (get_user(data, (u_int *)userPtr)) if (get_user(data, (u_int __user *)userPtr))
return -EFAULT; return -EFAULT;
userPtr += 4; userPtr += 4;
data = le2be16dbl(data) ^ 0x80008000; data = le2be16dbl(data) ^ 0x80008000;
......
...@@ -157,7 +157,7 @@ static int AmiStateInfo(char *buffer, size_t space); ...@@ -157,7 +157,7 @@ static int AmiStateInfo(char *buffer, size_t space);
* Native format * Native format
*/ */
static ssize_t ami_ct_s8(const u_char *userPtr, size_t userCount, static ssize_t ami_ct_s8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) u_char frame[], ssize_t *frameUsed, ssize_t frameLeft)
{ {
ssize_t count, used; ssize_t count, used;
...@@ -190,7 +190,7 @@ static ssize_t ami_ct_s8(const u_char *userPtr, size_t userCount, ...@@ -190,7 +190,7 @@ static ssize_t ami_ct_s8(const u_char *userPtr, size_t userCount,
*/ */
#define GENERATE_AMI_CT8(funcname, convsample) \ #define GENERATE_AMI_CT8(funcname, convsample) \
static ssize_t funcname(const u_char *userPtr, size_t userCount, \ static ssize_t funcname(const u_char __user *userPtr, size_t userCount, \
u_char frame[], ssize_t *frameUsed, \ u_char frame[], ssize_t *frameUsed, \
ssize_t frameLeft) \ ssize_t frameLeft) \
{ \ { \
...@@ -241,11 +241,11 @@ GENERATE_AMI_CT8(ami_ct_u8, AMI_CT_U8) ...@@ -241,11 +241,11 @@ GENERATE_AMI_CT8(ami_ct_u8, AMI_CT_U8)
*/ */
#define GENERATE_AMI_CT_16(funcname, convsample) \ #define GENERATE_AMI_CT_16(funcname, convsample) \
static ssize_t funcname(const u_char *userPtr, size_t userCount, \ static ssize_t funcname(const u_char __user *userPtr, size_t userCount, \
u_char frame[], ssize_t *frameUsed, \ u_char frame[], ssize_t *frameUsed, \
ssize_t frameLeft) \ ssize_t frameLeft) \
{ \ { \
const u_short *ptr = (const u_short *)userPtr; \ const u_short __user *ptr = (const u_short __user *)userPtr; \
ssize_t count, used; \ ssize_t count, used; \
u_short data; \ u_short data; \
\ \
......
...@@ -58,7 +58,7 @@ static void Q40Interrupt(void); ...@@ -58,7 +58,7 @@ static void Q40Interrupt(void);
/* userCount, frameUsed, frameLeft == byte counts */ /* userCount, frameUsed, frameLeft == byte counts */
static ssize_t q40_ct_law(const u_char *userPtr, size_t userCount, static ssize_t q40_ct_law(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -79,7 +79,7 @@ static ssize_t q40_ct_law(const u_char *userPtr, size_t userCount, ...@@ -79,7 +79,7 @@ static ssize_t q40_ct_law(const u_char *userPtr, size_t userCount,
} }
static ssize_t q40_ct_s8(const u_char *userPtr, size_t userCount, static ssize_t q40_ct_s8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -98,7 +98,7 @@ static ssize_t q40_ct_s8(const u_char *userPtr, size_t userCount, ...@@ -98,7 +98,7 @@ static ssize_t q40_ct_s8(const u_char *userPtr, size_t userCount,
return used; return used;
} }
static ssize_t q40_ct_u8(const u_char *userPtr, size_t userCount, static ssize_t q40_ct_u8(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft) ssize_t frameLeft)
{ {
...@@ -114,7 +114,7 @@ static ssize_t q40_ct_u8(const u_char *userPtr, size_t userCount, ...@@ -114,7 +114,7 @@ static ssize_t q40_ct_u8(const u_char *userPtr, size_t userCount,
/* a bit too complicated to optimise right now ..*/ /* a bit too complicated to optimise right now ..*/
static ssize_t q40_ctx_law(const u_char *userPtr, size_t userCount, static ssize_t q40_ctx_law(const u_char __user *userPtr, size_t userCount,
u_char frame[], ssize_t *frameUsed, u_char frame[], ssize_t *frameUsed,
ssize_t frameLeft)