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

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Jun 4 13:59:02 EDT 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=ff0de61c3612410dc84a8de28761ef840d5d35ac
Commit:     ff0de61c3612410dc84a8de28761ef840d5d35ac
Parent:     437d0d299f0e08954c3cb680221d7e888e1a857f
Author:     Robert P. J. Day <rpjday at crashcourse.ca>
AuthorDate: Sun May 25 07:35:17 2008 -0400
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Wed Jun 4 17:28:03 2008 +0100

    [MTD] [NAND] excite_nandflash: simplify code using ARRAY_SIZE() macro.
    
    Signed-off-by: Robert P. J. Day <rpjday at crashcourse.ca>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/nand/excite_nandflash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/excite_nandflash.c b/drivers/mtd/nand/excite_nandflash.c
index bed8729..ced14b5 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);



More information about the linux-mtd-cvs mailing list