X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fdvb%2Fdvb-core%2Fdvb_functions.c;h=2a39b2ef98e5f1e243654878b5bdd8d92bbcb102;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=d608fdbb17693e6f438be1a75f270c929b93eb8b;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/media/dvb/dvb-core/dvb_functions.c b/drivers/media/dvb/dvb-core/dvb_functions.c index d608fdbb1..2a39b2ef9 100644 --- a/drivers/media/dvb/dvb-core/dvb_functions.c +++ b/drivers/media/dvb/dvb-core/dvb_functions.c @@ -36,7 +36,11 @@ int dvb_usercopy(struct inode *inode, struct file *file, /* Copy arguments into temp kernel buffer */ switch (_IOC_DIR(cmd)) { case _IOC_NONE: - parg = (void *)arg; + /* + * For this command, the pointer is actually an integer + * argument. + */ + parg = (void *) arg; break; case _IOC_READ: /* some v4l ioctls are marked wrong ... */ case _IOC_WRITE: @@ -52,7 +56,7 @@ int dvb_usercopy(struct inode *inode, struct file *file, } err = -EFAULT; - if (copy_from_user(parg, (void *)arg, _IOC_SIZE(cmd))) + if (copy_from_user(parg, (void __user *)arg, _IOC_SIZE(cmd))) goto out; break; } @@ -69,7 +73,7 @@ int dvb_usercopy(struct inode *inode, struct file *file, { case _IOC_READ: case (_IOC_WRITE | _IOC_READ): - if (copy_to_user((void *)arg, parg, _IOC_SIZE(cmd))) + if (copy_to_user((void __user *)arg, parg, _IOC_SIZE(cmd))) err = -EFAULT; break; }