提交 ec5e34c0 编写于 作者: N Nick Kralevich 提交者: Greg Kroah-Hartman

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=38561Signed-off-by: NNick Kralevich <nnk@google.com>
Signed-off-by: NJun Tian <jun.j.tian@intel.com>
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f10d8434
......@@ -202,8 +202,6 @@ static int goldfish_nand_read(struct mtd_info *mtd, loff_t from, size_t len,
if (from + len > mtd->size)
goto invalid_arg;
if (len != mtd->writesize)
goto invalid_arg;
rem = do_div(from, mtd->writesize);
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)
goto invalid_arg;
if (len != mtd->writesize)
goto invalid_arg;
rem = do_div(to, mtd->writesize);
if (rem)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册