[MTD] Fix ixp4xx partition parsing.
authorBrian Walsh <brian@walsh.ws>
Fri, 22 Sep 2006 09:16:16 +0000 (10:16 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Fri, 22 Sep 2006 09:16:16 +0000 (10:16 +0100)
If the amount of flash is not divisible by 2 then the mask in
parse_mtd_partitions would fail to work as designed.  Passing in the base
address corrects this problem.

Signed-off-by: Brian Walsh <brian@walsh.ws>
Cc: Deepak Sanexa <dsanexa@mvista.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/maps/ixp4xx.c

index 986c586283907b517ec236cd13b7d6fd0225c3cb..7a828e3e6446d7f9254f083d3b02bb2e9e02e9e0 100644 (file)
@@ -253,7 +253,7 @@ static int ixp4xx_flash_probe(struct platform_device *dev)
        /* Use the fast version */
        info->map.write = ixp4xx_write16,
 
-       err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0);
+       err = parse_mtd_partitions(info->mtd, probes, &info->partitions, dev->resource->start);
        if (err > 0) {
                err = add_mtd_partitions(info->mtd, info->partitions, err);
                if(err)