goldfish_nand.c: remove length restrictions
authorNick Kralevich <nnk@google.com>
Mon, 12 May 2014 15:55:16 +0000 (16:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:19:00 +0000 (13:19 -0700)
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>
drivers/staging/goldfish/goldfish_nand.c

index b8e3dd28096dc44040118f7db5f136a77c54a1b4..b7ca553dfa29d1fe597f87dd31f74be7fc46b8c0 100644 (file)
@@ -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)