[PATCH 04/11] lpddr: replace open-coded ARRAY_SIZE with macro

Jim Cromie jim.cromie at gmail.com
Tue Apr 10 20:55:56 EDT 2012


Signed-off-by: Jim Cromie <jim.cromie at gmail.com>
---
 drivers/mtd/lpddr/qinfo_probe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/lpddr/qinfo_probe.c b/drivers/mtd/lpddr/qinfo_probe.c
index dbfe17b..45abed6 100644
--- a/drivers/mtd/lpddr/qinfo_probe.c
+++ b/drivers/mtd/lpddr/qinfo_probe.c
@@ -57,7 +57,7 @@ static struct qinfo_query_info qinfo_array[] = {
 
 static long lpddr_get_qinforec_pos(struct map_info *map, char *id_str)
 {
-	int qinfo_lines = sizeof(qinfo_array)/sizeof(struct qinfo_query_info);
+	int qinfo_lines = ARRAY_SIZE(qinfo_array);
 	int i;
 	int bankwidth = map_bankwidth(map) * 8;
 	int major, minor;
-- 
1.7.8.1




More information about the linux-mtd mailing list