Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106432
b: refs/heads/master
c: 175428b
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and David Woodhouse committed Jul 11, 2008
1 parent 5f5367d commit 48726ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f6928378b165c4b0d57a711e1c1eb925ad33846
refs/heads/master: 175428b2b3eeacf90dcc171d5915d6b4dc86e917
18 changes: 9 additions & 9 deletions trunk/drivers/mtd/mtdchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,29 +577,29 @@ static int mtd_ioctl(struct inode *inode, struct file *file,

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;

if (!mtd->lock)
ret = -EOPNOTSUPP;
else
ret = mtd->lock(mtd, info.start, info.length);
ret = mtd->lock(mtd, einfo.start, einfo.length);
break;
}

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;

if (!mtd->unlock)
ret = -EOPNOTSUPP;
else
ret = mtd->unlock(mtd, info.start, info.length);
ret = mtd->unlock(mtd, einfo.start, einfo.length);
break;
}

Expand Down Expand Up @@ -699,15 +699,15 @@ static int mtd_ioctl(struct inode *inode, struct file *file,

case OTPLOCK:
{
struct otp_info info;
struct otp_info oinfo;

if (mfi->mode != MTD_MODE_OTP_USER)
return -EINVAL;
if (copy_from_user(&info, argp, sizeof(info)))
if (copy_from_user(&oinfo, argp, sizeof(oinfo)))
return -EFAULT;
if (!mtd->lock_user_prot_reg)
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;
}
#endif
Expand Down

0 comments on commit 48726ba

Please sign in to comment.