From: Robert P. J. Day <rpjday@crashcourse.ca>
Date: Sun, 25 May 2008 11:35:17 +0000 (-0400)
Subject: [MTD] [NAND] excite_nandflash: simplify code using ARRAY_SIZE() macro.
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ff0de61c3612410dc84a8de28761ef840d5d35ac;p=linux.git

[MTD] [NAND] excite_nandflash: simplify code using ARRAY_SIZE() macro.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
---

diff --git a/drivers/mtd/nand/excite_nandflash.c b/drivers/mtd/nand/excite_nandflash.c
index bed87290deccd..ced14b5294d51 100644
--- a/drivers/mtd/nand/excite_nandflash.c
+++ b/drivers/mtd/nand/excite_nandflash.c
@@ -209,7 +209,7 @@ static int __init excite_nand_probe(struct device *dev)
 	if (likely(!scan_res)) {
 		DEBUG(MTD_DEBUG_LEVEL2, "%s: register partitions\n", module_id);
 		add_mtd_partitions(&drvdata->board_mtd, partition_info,
-				   sizeof partition_info / sizeof partition_info[0]);
+				   ARRAY_SIZE(partition_info));
 	} else {
 		iounmap(drvdata->regs);
 		kfree(drvdata);