diff options
author | Kevin Cernekee <kpc.mtd@gmail.com> | 2009-04-09 01:53:49 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-05-29 10:27:07 -0400 |
commit | aea7cea9fa9e39e71f95ad70b3daf98ba9972587 (patch) | |
tree | 1027622aa55451ab62b79e47f20c3fdee6ccaef9 /drivers/mtd | |
parent | 977185404046afb31d2e18fac0a076de1a20bf0e (diff) |
mtd: add OOB ioctls for >4GiB devices
Signed-off-by: Kevin Cernekee <kpc.mtd@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/mtdchar.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 51bb0b092003..99d1fbc95011 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -607,6 +607,34 @@ static int mtd_ioctl(struct inode *inode, struct file *file, | |||
607 | break; | 607 | break; |
608 | } | 608 | } |
609 | 609 | ||
610 | case MEMWRITEOOB64: | ||
611 | { | ||
612 | struct mtd_oob_buf64 buf; | ||
613 | struct mtd_oob_buf64 __user *buf_user = argp; | ||
614 | |||
615 | if (copy_from_user(&buf, argp, sizeof(buf))) | ||
616 | ret = -EFAULT; | ||
617 | else | ||
618 | ret = mtd_do_writeoob(file, mtd, buf.start, buf.length, | ||
619 | (void __user *)(uintptr_t)buf.usr_ptr, | ||
620 | &buf_user->length); | ||
621 | break; | ||
622 | } | ||
623 | |||
624 | case MEMREADOOB64: | ||
625 | { | ||
626 | struct mtd_oob_buf64 buf; | ||
627 | struct mtd_oob_buf64 __user *buf_user = argp; | ||
628 | |||
629 | if (copy_from_user(&buf, argp, sizeof(buf))) | ||
630 | ret = -EFAULT; | ||
631 | else | ||
632 | ret = mtd_do_readoob(mtd, buf.start, buf.length, | ||
633 | (void __user *)(uintptr_t)buf.usr_ptr, | ||
634 | &buf_user->length); | ||
635 | break; | ||
636 | } | ||
637 | |||
610 | case MEMLOCK: | 638 | case MEMLOCK: |
611 | { | 639 | { |
612 | struct erase_info_user einfo; | 640 | struct erase_info_user einfo; |