[PATCH 1/2] mtd: spi-nor: make n_sectors in flash_info 32 bit wide

Bastian Stender bst at pengutronix.de
Mon Jan 16 07:12:13 PST 2017


Since MRAM chips (like the Everspin mr25h40) are not sector organized
they should be defined as n_sectors * 1 byte sectors. To be able to
store the higher number of sectors n_sectors should be an unsigned 32
bit integer just like sector_size.

Signed-off-by: Bastian Stender <bst at pengutronix.de>
---
 drivers/mtd/spi-nor/spi-nor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index da7cd69d4857..c8399522c69d 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -55,7 +55,7 @@ struct flash_info {
 	 * necessarily called a "sector" by the vendor.
 	 */
 	unsigned	sector_size;
-	u16		n_sectors;
+	unsigned	n_sectors;
 
 	u16		page_size;
 	u16		addr_width;
-- 
2.11.0




More information about the linux-mtd mailing list