aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/moxa.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2006-01-09 20:54:02 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 08:01:56 -0800
commitfe971071a89c5c5184fc9f3482c7a8e997cf0520 (patch)
tree74a29e80d5636255f33c750482497a32d8d3491f /drivers/char/moxa.c
parent[PATCH] turn "const static" into "static const" (diff)
downloadlinux-dev-fe971071a89c5c5184fc9f3482c7a8e997cf0520.tar.xz
linux-dev-fe971071a89c5c5184fc9f3482c7a8e997cf0520.zip
[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>
Diffstat (limited to 'drivers/char/moxa.c')
-rw-r--r--drivers/char/moxa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 79e490ef2cf2..46a3a8ccd65f 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -448,7 +448,7 @@ static int __init moxa_init(void)
#ifdef CONFIG_PCI
{
struct pci_dev *p = NULL;
- int n = (sizeof(moxa_pcibrds) / sizeof(moxa_pcibrds[0])) - 1;
+ int n = ARRAY_SIZE(moxa_pcibrds) - 1;
i = 0;
while (i < n) {
while ((p = pci_get_device(moxa_pcibrds[i].vendor, moxa_pcibrds[i].device, p))!=NULL)