From: Robert P. J. Day Date: Mon, 26 May 2008 11:21:07 +0000 (+1000) Subject: [CRYPTO] hifn: Simplify code using ARRAY_SIZE() macro X-Git-Tag: v2.6.27-rc1~1107^2~20 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0936a944068ef68f8b19f437e03f4654c29f2423;p=linux-2.6 [CRYPTO] hifn: Simplify code using ARRAY_SIZE() macro Signed-off-by: Robert P. J. Day Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index d0f71a1c1a..4d22b21bd3 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -895,7 +895,7 @@ static int hifn_enable_crypto(struct hifn_device *dev) char *offtbl = NULL; int i; - for (i = 0; i < sizeof(pci2id)/sizeof(pci2id[0]); i++) { + for (i = 0; i < ARRAY_SIZE(pci2id); i++) { if (pci2id[i].pci_vendor == dev->pdev->vendor && pci2id[i].pci_prod == dev->pdev->device) { offtbl = pci2id[i].card_id;