kernel: split out mtd hack for CONFIG_FIT_PARTITION + rootfs
[openwrt/staging/hauke.git] / target / linux / generic / hack-5.10 / 420-mtd-set-rootfs-to-be-root-dev.patch
index fa3b175dcf0748fd43b5e8c7ce6e8bfaa66af47c..a70d8af4c262ebcd4ae5059fb73ba1429932e754 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  #include <linux/nvmem-provider.h>
  
  #include <linux/mtd/mtd.h>
-@@ -759,6 +760,19 @@ int add_mtd_device(struct mtd_info *mtd)
+@@ -759,6 +760,16 @@ int add_mtd_device(struct mtd_info *mtd)
           of this try_ nonsense, and no bitching about it
           either. :) */
        __module_get(THIS_MODULE);
@@ -31,9 +31,6 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +              unsigned int index = mtd->index;
 +              pr_notice("mtd: device %d (%s) set to be root filesystem\n",
 +                        mtd->index, mtd->name);
-+#ifdef CONFIG_FIT_PARTITION
-+              index <<= 2;
-+#endif
 +              ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, index);
 +      }
 +