[PATCH] drivers/mtd: Use ARRAY_SIZE macro

Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of the macro.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Tobias Klauser
2006-03-31 02:29:45 -08:00
committed by Linus Torvalds
parent 54af6b4648
commit 87d10f3c79
22 changed files with 31 additions and 45 deletions

View File

@ -128,8 +128,7 @@ static struct mtd_partition nettel_amd_partitions[] = {
}
};
#define NUM_AMD_PARTITIONS \
(sizeof(nettel_amd_partitions)/sizeof(nettel_amd_partitions[0]))
#define NUM_AMD_PARTITIONS ARRAY_SIZE(nettel_amd_partitions)
/****************************************************************************/