linux: generic: fix split_squashfs for 3.6
authorJonas Gorski <jogo@openwrt.org>
Tue, 6 Nov 2012 00:48:21 +0000 (00:48 +0000)
committerJonas Gorski <jogo@openwrt.org>
Tue, 6 Nov 2012 00:48:21 +0000 (00:48 +0000)
_read expects the retlen to be initialized to zero, which the mtd_read
helper does. So fix it by using mtd_read instead of calling _read directly.

SVN-Revision: 34093

target/linux/generic/patches-3.6/400-rootfs_split.patch

index 976f56002df1c832eaa68f530b61721762f43706..8e61f7786981df0a3792dce93d6f5ce4d4b6c174 100644 (file)
@@ -55,7 +55,7 @@
 +      struct squashfs_super_block sb;
 +      int len, ret;
 +
-+      ret = master->_read(master, offset, sizeof(sb), &len, (void *) &sb);
++      ret = mtd_read(master, offset, sizeof(sb), &len, (void *) &sb);
 +      if (ret || (len != sizeof(sb))) {
 +              printk(KERN_ALERT "split_squashfs: error occured while reading "
 +                      "from \"%s\"\n", master->name);