mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 16:49:22 +00:00
goldfish_nand.c: remove length restrictions
Remove limitations on the size of a read / write request. AFAIK, there's no consequence to allowing the upper layers to specify different read / write sizes. This is needed to support running ext4 on goldfish. Bug: https://code.google.com/p/android/issues/detail?id=38561 Signed-off-by: Nick Kralevich <nnk@google.com> Signed-off-by: Jun Tian <jun.j.tian@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f10d843420
commit
ec5e34c074
1 changed files with 0 additions and 4 deletions
|
@ -202,8 +202,6 @@ static int goldfish_nand_read(struct mtd_info *mtd, loff_t from, size_t len,
|
||||||
|
|
||||||
if (from + len > mtd->size)
|
if (from + len > mtd->size)
|
||||||
goto invalid_arg;
|
goto invalid_arg;
|
||||||
if (len != mtd->writesize)
|
|
||||||
goto invalid_arg;
|
|
||||||
|
|
||||||
rem = do_div(from, mtd->writesize);
|
rem = do_div(from, mtd->writesize);
|
||||||
if (rem)
|
if (rem)
|
||||||
|
@ -226,8 +224,6 @@ static int goldfish_nand_write(struct mtd_info *mtd, loff_t to, size_t len,
|
||||||
|
|
||||||
if (to + len > mtd->size)
|
if (to + len > mtd->size)
|
||||||
goto invalid_arg;
|
goto invalid_arg;
|
||||||
if (len != mtd->writesize)
|
|
||||||
goto invalid_arg;
|
|
||||||
|
|
||||||
rem = do_div(to, mtd->writesize);
|
rem = do_div(to, mtd->writesize);
|
||||||
if (rem)
|
if (rem)
|
||||||
|
|
Loading…
Reference in a new issue