VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / media / video / tvmixer.c
index f690126..48b2f82 100644 (file)
@@ -77,6 +77,8 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
        int left,right,ret,val = 0;
         struct TVMIXER *mix = file->private_data;
        struct i2c_client *client = mix->dev;
+       void __user *argp = (void __user *)arg;
+       int __user *p = argp;
 
        if (NULL == client)
                return -ENODEV;
@@ -86,7 +88,7 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
                 strlcpy(info.id, "tv card", sizeof(info.id));
                 strlcpy(info.name, i2c_clientname(client), sizeof(info.name));
                 info.modify_counter = 42 /* FIXME */;
-                if (copy_to_user((void *)arg, &info, sizeof(info)))
+                if (copy_to_user(argp, &info, sizeof(info)))
                         return -EFAULT;
                 return 0;
         }
@@ -94,15 +96,15 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
                 _old_mixer_info info;
                 strlcpy(info.id, "tv card", sizeof(info.id));
                 strlcpy(info.name, i2c_clientname(client), sizeof(info.name));
-                if (copy_to_user((void *)arg, &info, sizeof(info)))
+                if (copy_to_user(argp, &info, sizeof(info)))
                         return -EFAULT;
                 return 0;
         }
         if (cmd == OSS_GETVERSION)
-                return put_user(SOUND_VERSION, (int *)arg);
+                return put_user(SOUND_VERSION, p);
 
        if (_SIOC_DIR(cmd) & _SIOC_WRITE)
-               if (get_user(val, (int *)arg))
+               if (get_user(val, p))
                        return -EFAULT;
 
        /* read state */
@@ -168,7 +170,7 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
        default:
                return -EINVAL;
        }
-       if (put_user(ret, (int *)arg))
+       if (put_user(ret, p))
                return -EFAULT;
        return 0;
 }