Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
struct inode *inode = file->f_path.dentry->d_inode;
struct mtd_file_info *mfi = file->private_data;
struct mtd_info *mtd = mfi->mtd;
struct inode *inode = file->f_path.dentry->d_inode;
struct mtd_file_info *mfi = file->private_data;
struct mtd_info *mtd = mfi->mtd;
- void __user *argp = (void __user *)arg;
+ void __user *argp = compat_ptr(arg);
int ret = 0;
lock_kernel();
int ret = 0;
lock_kernel();
- ret = mtd_ioctl(inode, file, cmd, arg);
+ ret = mtd_ioctl(inode, file, cmd, (unsigned long)argp);