diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-02-23 22:59:53 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-02-23 22:59:53 +0000 |
commit | 1c063070cf6bc2b81674f60b6ad6ae0ee9b4152f (patch) | |
tree | 0a83cfa5ea98e519ade4fa7f4e8a859e26bd737c /target/linux/generic/patches-4.0/480-mtd-set-rootfs-to-be-root-dev.patch | |
parent | ad077832bfb03106a02b7be02b560c13e77d0436 (diff) | |
download | mtk-20170518-1c063070cf6bc2b81674f60b6ad6ae0ee9b4152f.zip mtk-20170518-1c063070cf6bc2b81674f60b6ad6ae0ee9b4152f.tar.gz mtk-20170518-1c063070cf6bc2b81674f60b6ad6ae0ee9b4152f.tar.bz2 |
generic: early (incomplete!) 4.0 support
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 44511
Diffstat (limited to 'target/linux/generic/patches-4.0/480-mtd-set-rootfs-to-be-root-dev.patch')
-rw-r--r-- | target/linux/generic/patches-4.0/480-mtd-set-rootfs-to-be-root-dev.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/generic/patches-4.0/480-mtd-set-rootfs-to-be-root-dev.patch b/target/linux/generic/patches-4.0/480-mtd-set-rootfs-to-be-root-dev.patch new file mode 100644 index 0000000..4b89412 --- /dev/null +++ b/target/linux/generic/patches-4.0/480-mtd-set-rootfs-to-be-root-dev.patch @@ -0,0 +1,26 @@ +--- a/drivers/mtd/mtdcore.c ++++ b/drivers/mtd/mtdcore.c +@@ -38,6 +38,7 @@ + #include <linux/gfp.h> + #include <linux/slab.h> + #include <linux/reboot.h> ++#include <linux/root_dev.h> + + #include <linux/mtd/mtd.h> + #include <linux/mtd/partitions.h> +@@ -447,6 +448,15 @@ int add_mtd_device(struct mtd_info *mtd) + of this try_ nonsense, and no bitching about it + either. :) */ + __module_get(THIS_MODULE); ++ ++ if (!strcmp(mtd->name, "rootfs") && ++ config_enabled(CONFIG_MTD_ROOTFS_ROOT_DEV) && ++ ROOT_DEV == 0) { ++ pr_notice("mtd: device %d (%s) set to be root filesystem\n", ++ mtd->index, mtd->name); ++ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, mtd->index); ++ } ++ + return 0; + + fail_added: |