[patch 2/4] Make partitions optional in physmap_of

Josh Boyer jwboyer at linux.vnet.ibm.com
Sat Sep 15 04:54:12 EST 2007


The latest physmap_of driver has a small error where it will fail the probe
with:

physmap-flash: probe of fff00000.small-flas failed with error -2

if there are no partition subnodes in the device tree and the old style binding
is not used.  Since partition definitions are optional, the probe should still
succeed.

Signed-off-by: Josh Boyer <jwboyer at linux.vnet.ibm.com>

---
 drivers/mtd/maps/physmap_of.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-2.6.orig/drivers/mtd/maps/physmap_of.c
+++ linux-2.6/drivers/mtd/maps/physmap_of.c
@@ -142,6 +142,8 @@ static int __devinit process_partitions(
 		}
 	} else {
 		nr_parts = parse_obsolete_partitions(dev, info, dp);
+		if (nr_parts == -ENOENT)
+			nr_parts = 0;
 	}
 
 	if (nr_parts < 0)

-- 




More information about the Linuxppc-dev mailing list