|
@@ -577,29 +577,29 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
|
|
|
|
|
|
case MEMLOCK:
|
|
case MEMLOCK:
|
|
{
|
|
{
|
|
- struct erase_info_user info;
|
|
|
|
|
|
+ struct erase_info_user einfo;
|
|
|
|
|
|
- if (copy_from_user(&info, argp, sizeof(info)))
|
|
|
|
|
|
+ if (copy_from_user(&einfo, argp, sizeof(einfo)))
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
|
|
|
|
if (!mtd->lock)
|
|
if (!mtd->lock)
|
|
ret = -EOPNOTSUPP;
|
|
ret = -EOPNOTSUPP;
|
|
else
|
|
else
|
|
- ret = mtd->lock(mtd, info.start, info.length);
|
|
|
|
|
|
+ ret = mtd->lock(mtd, einfo.start, einfo.length);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
case MEMUNLOCK:
|
|
case MEMUNLOCK:
|
|
{
|
|
{
|
|
- struct erase_info_user info;
|
|
|
|
|
|
+ struct erase_info_user einfo;
|
|
|
|
|
|
- if (copy_from_user(&info, argp, sizeof(info)))
|
|
|
|
|
|
+ if (copy_from_user(&einfo, argp, sizeof(einfo)))
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
|
|
|
|
if (!mtd->unlock)
|
|
if (!mtd->unlock)
|
|
ret = -EOPNOTSUPP;
|
|
ret = -EOPNOTSUPP;
|
|
else
|
|
else
|
|
- ret = mtd->unlock(mtd, info.start, info.length);
|
|
|
|
|
|
+ ret = mtd->unlock(mtd, einfo.start, einfo.length);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -699,15 +699,15 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
|
|
|
|
|
|
case OTPLOCK:
|
|
case OTPLOCK:
|
|
{
|
|
{
|
|
- struct otp_info info;
|
|
|
|
|
|
+ struct otp_info oinfo;
|
|
|
|
|
|
if (mfi->mode != MTD_MODE_OTP_USER)
|
|
if (mfi->mode != MTD_MODE_OTP_USER)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
- if (copy_from_user(&info, argp, sizeof(info)))
|
|
|
|
|
|
+ if (copy_from_user(&oinfo, argp, sizeof(oinfo)))
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
if (!mtd->lock_user_prot_reg)
|
|
if (!mtd->lock_user_prot_reg)
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|
|
- ret = mtd->lock_user_prot_reg(mtd, info.start, info.length);
|
|
|
|
|
|
+ ret = mtd->lock_user_prot_reg(mtd, oinfo.start, oinfo.length);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|