summaryrefslogtreecommitdiffstats
path: root/drivers/block/amiflop.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 01:06:28 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 09:09:03 -0800
commit8a423e542b4a9af45ac0106ab8275760af770793 (patch)
tree5d21bac2d641afcc6e908ea82c98dd52980c561c /drivers/block/amiflop.c
parent6225d85f171f8b7a776850d30352bd196f9bd0d6 (diff)
[PATCH] m68k: amiflop __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block/amiflop.c')
-rw-r--r--drivers/block/amiflop.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 4c3b7df46f9..3e2530d6176 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1441,6 +1441,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
{
int drive = iminor(inode) & 3;
static struct floppy_struct getprm;
+ void __user *argp = (void __user *)param;
switch(cmd){
case FDFMTBEG:
@@ -1486,9 +1487,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
getprm.head=unit[drive].type->heads;
getprm.sect=unit[drive].dtype->sects * unit[drive].type->sect_mult;
getprm.size=unit[drive].blocks;
- if (copy_to_user((void *)param,
- (void *)&getprm,
- sizeof(struct floppy_struct)))
+ if (copy_to_user(argp, &getprm, sizeof(struct floppy_struct)))
return -EFAULT;
break;
case FDSETPRM:
@@ -1500,8 +1499,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
break;
#ifdef RAW_IOCTL
case IOCTL_RAW_TRACK:
- if (copy_to_user((void *)param, raw_buf,
- unit[drive].type->read_size))
+ if (copy_to_user(argp, raw_buf, unit[drive].type->read_size))
return -EFAULT;
else
return unit[drive].type->read_size;