mtd: mchp23k256: add partitioning support
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu Jul 13 10:59:04 PDT 2017
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=2f071ff175ea221710d583222b55f915d90901f0
Commit: 2f071ff175ea221710d583222b55f915d90901f0
Parent: 44225c9c79ae288b5f1668dc5dda7ba9f87995f1
Author: Chris Packham <chris.packham at alliedtelesis.co.nz>
AuthorDate: Fri Jun 2 15:21:18 2017 +1200
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Thu Jun 8 16:28:03 2017 -0700
mtd: mchp23k256: add partitioning support
Setting the of_node for the mtd device allows the generic mtd code to
setup the partitions.
[Editorial note (Brian): patch still pending on fixing up the "aligned
to eraseblock" partition sanity check, given that this SRAM has no
eraseblocks.]
Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
Tested-by: Andrew Lunn <andrew at lunn.ch>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/devices/mchp23k256.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c
index 2542f5b..3e5feb4 100644
--- a/drivers/mtd/devices/mchp23k256.c
+++ b/drivers/mtd/devices/mchp23k256.c
@@ -143,6 +143,7 @@ static int mchp23k256_probe(struct spi_device *spi)
data = dev_get_platdata(&spi->dev);
+ mtd_set_of_node(&flash->mtd, spi->dev.of_node);
flash->mtd.dev.parent = &spi->dev;
flash->mtd.type = MTD_RAM;
flash->mtd.flags = MTD_CAP_RAM;
More information about the linux-mtd-cvs
mailing list