aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/atheros-2.6
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-02-19 16:48:02 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-02-19 16:48:02 +0000
commite10c97c2ca30b063dcb86c81fffe0b3abe505d2a (patch)
tree0748d2d969c133aba338cfab360a884891182643 /target/linux/atheros-2.6
parent32ac162630614c548b12e59afca03582252dad99 (diff)
downloadupstream-e10c97c2ca30b063dcb86c81fffe0b3abe505d2a.tar.gz
upstream-e10c97c2ca30b063dcb86c81fffe0b3abe505d2a.tar.bz2
upstream-e10c97c2ca30b063dcb86c81fffe0b3abe505d2a.zip
fix ar2315 rootfs mount
SVN-Revision: 6325
Diffstat (limited to 'target/linux/atheros-2.6')
-rw-r--r--target/linux/atheros-2.6/files/drivers/mtd/devices/spiflash.c8
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);