-+static void split_squashfs(struct mtd_info *master, const char *name,
-+ int offset, int size)
-+{
-+ struct squashfs_super_block sb;
-+ int len, ret;
-+
-+ offset += 0x100;
-+ size -= 0x100;
-+
-+ ret = mtd_read(master, offset, sizeof(sb), &len, (void *) &sb);
-+ if (ret || (len != sizeof(sb)))
-+ return;
-+
-+ if (SQUASHFS_MAGIC != le32_to_cpu(sb.s_magic) )
-+ return;
-+
-+ if (le64_to_cpu((sb.bytes_used)) <= 0)
-+ printk(KERN_ALERT "split_squashfs: squashfs is empty in \"%s\"\n",
-+ master->name);
-+ return;
-+
-+ len = (u32) le64_to_cpu(sb.bytes_used);
-+ len = mtd_pad_erasesize(master, offset, len);
-+ offset += len;
-+ size -= len ;
-+ printk(KERN_INFO "mtd: partition \"%s\" created automatically, ofs=0x%x, len=0x%x\n",
-+ ROOTFS_SPLIT_NAME, offset, size);
-+
-+ __mtd_add_partition(master, ROOTFS_SPLIT_NAME, offset,
-+ size, false);
-+}
-+