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

Submitted by Jim Cromie on April 11, 2012, 12:55 a.m.

Details

Message ID 1334105756-9161-1-git-send-email-jim.cromie@gmail.com
State Accepted
Commit 287558fe0e06a85c32863ec9204ed39fc218c5e3
Headers show

Commit Message

Jim Cromie April 11, 2012, 12:55 a.m.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 drivers/mtd/lpddr/qinfo_probe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Artem Bityutskiy April 21, 2012, 2:19 p.m.
On Tue, 2012-04-10 at 18:55 -0600, Jim Cromie wrote:
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>

Pushed to l2-mtd.git, thanks!

Patch hide | download patch | download mbox

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;