1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Sat Apr 10 17:00:57 2021 +0200
3 Subject: [PATCH] mtd: fix squashfs root on targets with CONFIG_FIT_PARTITION
5 Fix assumption about the block device index
8 --- a/drivers/mtd/mtdcore.c
9 +++ b/drivers/mtd/mtdcore.c
10 @@ -767,6 +767,9 @@ int add_mtd_device(struct mtd_info *mtd)
11 unsigned int index = mtd->index;
12 pr_notice("mtd: device %d (%s) set to be root filesystem\n",
13 mtd->index, mtd->name);
14 +#ifdef CONFIG_FIT_PARTITION
17 ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index);