diff options
Diffstat (limited to 'drivers/mtd/mtdchar.c')
-rw-r--r-- | drivers/mtd/mtdchar.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 8b223c0343ee..a8e69dd2b2e4 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -676,6 +676,20 @@ static int mtd_ioctl(struct inode *inode, struct file *file, | |||
676 | break; | 676 | break; |
677 | } | 677 | } |
678 | 678 | ||
679 | case MEMISLOCKED: | ||
680 | { | ||
681 | struct erase_info_user einfo; | ||
682 | |||
683 | if (copy_from_user(&einfo, argp, sizeof(einfo))) | ||
684 | return -EFAULT; | ||
685 | |||
686 | if (!mtd->is_locked) | ||
687 | ret = -EOPNOTSUPP; | ||
688 | else | ||
689 | ret = mtd->is_locked(mtd, einfo.start, einfo.length); | ||
690 | break; | ||
691 | } | ||
692 | |||
679 | /* Legacy interface */ | 693 | /* Legacy interface */ |
680 | case MEMGETOOBSEL: | 694 | case MEMGETOOBSEL: |
681 | { | 695 | { |