[PATCH 042/104] mtd: m25p80: use ofpart through generic parsing
Dmitry Eremin-Solenikov
dbaryshkov at gmail.com
Thu Jun 2 10:51:20 EDT 2011
Convert the driver to use ofpart partitions parsing through the generic
parse_mtd_partitions().
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
drivers/mtd/devices/m25p80.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 70d5fca..a1cdb52 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -928,6 +928,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
if (info->flags & M25P_NO_ERASE)
flash->mtd.flags |= MTD_NO_ERASE;
+ flash->mtd.node = spi->dev.of_node;
flash->mtd.dev.parent = &spi->dev;
flash->page_size = info->page_size;
@@ -975,13 +976,6 @@ static int __devinit m25p_probe(struct spi_device *spi)
nr_parts = data->nr_parts;
}
-#ifdef CONFIG_MTD_OF_PARTS
- if (nr_parts <= 0 && spi->dev.of_node) {
- nr_parts = of_mtd_parse_partitions(&spi->dev,
- spi->dev.of_node, &parts);
- }
-#endif
-
if (nr_parts > 0) {
for (i = 0; i < nr_parts; i++) {
DEBUG(MTD_DEBUG_LEVEL2, "partitions[%d] = "
--
1.7.4.4
More information about the linux-mtd
mailing list