linux: bump all lts / stable to latest
[openadk.git] / target / linux / patches / 3.16.48 / mtd-rootfs.patch
blob775d5fc80799ef31e7ff9abfec2fd64963d1fdbd
1 diff -Nur linux-3.5.orig//drivers/mtd/mtdpart.c linux-3.5/drivers/mtd/mtdpart.c
2 --- linux-3.5.orig//drivers/mtd/mtdpart.c 2012-07-21 22:58:29.000000000 +0200
3 +++ linux-3.5/drivers/mtd/mtdpart.c 2012-07-31 23:59:07.000000000 +0200
4 @@ -30,6 +30,7 @@
5 #include <linux/mtd/mtd.h>
6 #include <linux/mtd/partitions.h>
7 #include <linux/err.h>
8 +#include <linux/root_dev.h>
10 #include "mtdcore.h"
12 @@ -637,6 +638,14 @@
13 if (IS_ERR(slave))
14 return PTR_ERR(slave);
16 + if (strcmp(parts[i].name, "rootfs") == 0) {
17 + if (ROOT_DEV == 0) {
18 + printk(KERN_NOTICE "mtd: partition \"rootfs\" "
19 + "set to be root filesystem\n");
20 + ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, i);
21 + }
22 + }
24 mutex_lock(&mtd_partitions_mutex);
25 list_add(&slave->list, &mtd_partitions);
26 mutex_unlock(&mtd_partitions_mutex);