diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-02-19 16:48:02 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-02-19 16:48:02 +0000 |
commit | 3fc2254515f9e8a4f9b88e885e35b46f7e1051ca (patch) | |
tree | 4a0b97d96950df450864017266f0985a62bf3719 /target/linux/atheros-2.6/files/drivers/mtd | |
parent | bbb3cb3a3c1892b0e57cd5b340db3f70ef30bd60 (diff) | |
download | upstream-3fc2254515f9e8a4f9b88e885e35b46f7e1051ca.tar.gz upstream-3fc2254515f9e8a4f9b88e885e35b46f7e1051ca.tar.bz2 upstream-3fc2254515f9e8a4f9b88e885e35b46f7e1051ca.zip |
fix ar2315 rootfs mount
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6325 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/atheros-2.6/files/drivers/mtd')
-rw-r--r-- | target/linux/atheros-2.6/files/drivers/mtd/devices/spiflash.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/target/linux/atheros-2.6/files/drivers/mtd/devices/spiflash.c b/target/linux/atheros-2.6/files/drivers/mtd/devices/spiflash.c index 067f32b314..32a132a9ea 100644 --- a/target/linux/atheros-2.6/files/drivers/mtd/devices/spiflash.c +++ b/target/linux/atheros-2.6/files/drivers/mtd/devices/spiflash.c @@ -396,7 +396,7 @@ static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; static int spiflash_probe(struct platform_device *pdev) { - int result = -1; + int i, result = -1; int index, num_parts; struct mtd_info *mtd; @@ -472,6 +472,12 @@ static int spiflash_probe(struct platform_device *pdev) #endif /* parse redboot partitions */ num_parts = parse_mtd_partitions(mtd, part_probe_types, &spidata->parsed_parts, 0); + for (i = 0; i < num_parts; i++) { + if (!strcmp(spidata->parsed_parts[i].name, ROOTFS_NAME)) { + /* create the root device */ + ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, i); + } + } #ifdef SPIFLASH_DEBUG printk (KERN_DEBUG "Found %d partitions\n", num_parts); |