aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/mtdchar.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 5fc2c4216c03..f5061fe72e4c 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -577,29 +577,29 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
577 577
578 case MEMLOCK: 578 case MEMLOCK:
579 { 579 {
580 struct erase_info_user info; 580 struct erase_info_user einfo;
581 581
582 if (copy_from_user(&info, argp, sizeof(info))) 582 if (copy_from_user(&einfo, argp, sizeof(einfo)))
583 return -EFAULT; 583 return -EFAULT;
584 584
585 if (!mtd->lock) 585 if (!mtd->lock)
586 ret = -EOPNOTSUPP; 586 ret = -EOPNOTSUPP;
587 else 587 else
588 ret = mtd->lock(mtd, info.start, info.length); 588 ret = mtd->lock(mtd, einfo.start, einfo.length);
589 break; 589 break;
590 } 590 }
591 591
592 case MEMUNLOCK: 592 case MEMUNLOCK:
593 { 593 {
594 struct erase_info_user info; 594 struct erase_info_user einfo;
595 595
596 if (copy_from_user(&info, argp, sizeof(info))) 596 if (copy_from_user(&einfo, argp, sizeof(einfo)))
597 return -EFAULT; 597 return -EFAULT;
598 598
599 if (!mtd->unlock) 599 if (!mtd->unlock)
600 ret = -EOPNOTSUPP; 600 ret = -EOPNOTSUPP;
601 else 601 else
602 ret = mtd->unlock(mtd, info.start, info.length); 602 ret = mtd->unlock(mtd, einfo.start, einfo.length);
603 break; 603 break;
604 } 604 }
605 605
@@ -699,15 +699,15 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
699 699
700 case OTPLOCK: 700 case OTPLOCK:
701 { 701 {
702 struct otp_info info; 702 struct otp_info oinfo;
703 703
704 if (mfi->mode != MTD_MODE_OTP_USER) 704 if (mfi->mode != MTD_MODE_OTP_USER)
705 return -EINVAL; 705 return -EINVAL;
706 if (copy_from_user(&info, argp, sizeof(info))) 706 if (copy_from_user(&oinfo, argp, sizeof(oinfo)))
707 return -EFAULT; 707 return -EFAULT;
708 if (!mtd->lock_user_prot_reg) 708 if (!mtd->lock_user_prot_reg)
709 return -EOPNOTSUPP; 709 return -EOPNOTSUPP;
710 ret = mtd->lock_user_prot_reg(mtd, info.start, info.length); 710 ret = mtd->lock_user_prot_reg(mtd, oinfo.start, oinfo.length);
711 break; 711 break;
712 } 712 }
713#endif 713#endif