1 --- a/drivers/mtd/mtdsplit/mtdsplit_trx.c
2 +++ b/drivers/mtd/mtdsplit/mtdsplit_trx.c
4 #include <linux/module.h>
5 #include <linux/init.h>
6 #include <linux/kernel.h>
8 #include <linux/slab.h>
9 #include <linux/mtd/mtd.h>
10 #include <linux/mtd/partitions.h>
15 -#define TRX_MAGIC 0x30524448 /* "HDR0" */
16 +#define TRX_MAGIC 0x30524448 /* "HDR0" */
17 +#define TRX_MAGIC_BUFFALO 0x746f435c
21 @@ -82,7 +84,8 @@ mtdsplit_parse_trx(struct mtd_info *mast
25 - if (hdr.magic != cpu_to_le32(TRX_MAGIC)) {
26 + if (hdr.magic != cpu_to_le32(TRX_MAGIC) &&
27 + !(of_machine_is_compatible("buffalo,wcr-1166ds") && hdr.magic == cpu_to_le32(TRX_MAGIC_BUFFALO))) {
28 pr_debug("no valid trx header found in \"%s\" at offset %llx\n",
29 master->name, (unsigned long long) offset);