diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-05-15 19:16:47 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-05-15 19:16:47 +0000 |
commit | 28b32ff372359068e875633fd4bd82ed49bc5a48 (patch) | |
tree | 6a26753f7ebd3acd487df815b6eef3fd8e14392d /target/linux/gemini/patches/100-mtd-physmap-try-static-partitions-first.patch | |
parent | d2356b24be471f2aa5d6ff607d259bb4fd407598 (diff) | |
download | upstream-28b32ff372359068e875633fd4bd82ed49bc5a48.tar.gz upstream-28b32ff372359068e875633fd4bd82ed49bc5a48.tar.bz2 upstream-28b32ff372359068e875633fd4bd82ed49bc5a48.zip |
[gemini] add static mtd map for the WBD-111
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15874 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/gemini/patches/100-mtd-physmap-try-static-partitions-first.patch')
-rw-r--r-- | target/linux/gemini/patches/100-mtd-physmap-try-static-partitions-first.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/gemini/patches/100-mtd-physmap-try-static-partitions-first.patch b/target/linux/gemini/patches/100-mtd-physmap-try-static-partitions-first.patch new file mode 100644 index 0000000000..887dab0b7d --- /dev/null +++ b/target/linux/gemini/patches/100-mtd-physmap-try-static-partitions-first.patch @@ -0,0 +1,30 @@ +--- a/drivers/mtd/maps/physmap.c ++++ b/drivers/mtd/maps/physmap.c +@@ -170,6 +170,13 @@ static int physmap_flash_probe(struct pl + goto err_out; + + #ifdef CONFIG_MTD_PARTITIONS ++ if (physmap_data->nr_parts) { ++ printk(KERN_NOTICE "Using physmap partition information\n"); ++ add_mtd_partitions(info->cmtd, physmap_data->parts, ++ physmap_data->nr_parts); ++ return 0; ++ } ++ + err = parse_mtd_partitions(info->cmtd, part_probe_types, + &info->parts, 0); + if (err > 0) { +@@ -177,13 +184,6 @@ static int physmap_flash_probe(struct pl + info->nr_parts = err; + return 0; + } +- +- if (physmap_data->nr_parts) { +- printk(KERN_NOTICE "Using physmap partition information\n"); +- add_mtd_partitions(info->cmtd, physmap_data->parts, +- physmap_data->nr_parts); +- return 0; +- } + #endif + + add_mtd_device(info->cmtd); |