[PATCH] drivers/char: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of ARRAY_SIZE. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
3c6bee1d40
commit
fe971071a8
@@ -723,7 +723,7 @@ static unsigned int cy_isa_addresses[] = {
|
||||
0xDE000,
|
||||
0,0,0,0,0,0,0,0
|
||||
};
|
||||
#define NR_ISA_ADDRS (sizeof(cy_isa_addresses)/sizeof(unsigned char*))
|
||||
#define NR_ISA_ADDRS ARRAY_SIZE(cy_isa_addresses)
|
||||
|
||||
#ifdef MODULE
|
||||
static long maddr[NR_CARDS] = { 0, };
|
||||
|
Reference in New Issue
Block a user