From: Ahmed S. Darwish Date: Sat, 10 Feb 2007 09:43:29 +0000 (-0800) Subject: [PATCH] ARM26: Use ARRAY_SIZE macro when appropriate X-Git-Tag: v2.6.21-rc1~274^2~451 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1725f2af89f1eda3cb9007290971b55084569a4;p=linux-2.6 [PATCH] ARM26: Use ARRAY_SIZE macro when appropriate Use ARRAY_SIZE macro already defined in linux/kernel.h Signed-off-by: Ahmed S. Darwish Acked-by: Ian Molton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/arm26/kernel/ecard.c b/arch/arm26/kernel/ecard.c index 9dbc17247c..e2bcefc91c 100644 --- a/arch/arm26/kernel/ecard.c +++ b/arch/arm26/kernel/ecard.c @@ -665,7 +665,7 @@ ecard_probe(int slot, card_type_t type) ec->fiqmask = 4; } - for (i = 0; i < sizeof(blacklist) / sizeof(*blacklist); i++) + for (i = 0; i < ARRAY_SIZE(blacklist); i++) if (blacklist[i].manufacturer == ec->cid.manufacturer && blacklist[i].product == ec->cid.product) { ec->card_desc = blacklist[i].type;