All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: introduce a macro for max NAND ID sequence length
@ 2013-03-14  7:58 Artem Bityutskiy
  2013-03-15  2:32 ` Huang Shijie
  0 siblings, 1 reply; 2+ messages in thread
From: Artem Bityutskiy @ 2013-03-14  7:58 UTC (permalink / raw)
  To: MTD Maling List; +Cc: Huang Shijie

From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

Introduce a helpful macro for the maximum NAND ID sequence length instead of
using the "8" magic number.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
 include/linux/mtd/nand.h |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index e2c7173..33516eb 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -542,6 +542,9 @@ struct nand_chip {
 #define NAND_MFR_MACRONIX	0xc2
 #define NAND_MFR_EON		0x92
 
+/* The maximum expected count of bytes in the NAND ID sequence */
+#define NAND_MAX_ID_LEN 8
+
 /*
  * A helper for defining older NAND chips where the second ID byte fully
  * defined the chip, including the geometry (chip size, eraseblock size, page
@@ -589,7 +592,7 @@ struct nand_flash_dev {
 			uint8_t mfr_id;
 			uint8_t dev_id;
 		};
-		uint8_t id[8];
+		uint8_t id[NAND_MAX_ID_LEN];
 	};
 	unsigned int pagesize;
 	unsigned int chipsize;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-14 13:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-14  7:58 [PATCH] mtd: introduce a macro for max NAND ID sequence length Artem Bityutskiy
2013-03-15  2:32 ` Huang Shijie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.