diff options
author | Ahmed S. Darwish <darwish.07@gmail.com> | 2007-02-12 03:53:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:34 -0500 |
commit | fd863db937c0d30679d4bd5329653adb46b66627 (patch) | |
tree | dd4bd40c998ee7718eca0d6139db32fb14451c87 | |
parent | fc238b3791447b93c69cd50a99dfcaad6162afba (diff) |
[PATCH] isdn/capi: use ARRAY_SIZE when appropriate
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/isdn/capi/capi.c | 4 | ||||
-rw-r--r-- | drivers/isdn/capi/capidrv.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index d22c0224fde6..38045910ca94 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -1456,7 +1456,7 @@ static struct procfsentries { | |||
1456 | 1456 | ||
1457 | static void __init proc_init(void) | 1457 | static void __init proc_init(void) |
1458 | { | 1458 | { |
1459 | int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]); | 1459 | int nelem = ARRAY_SIZE(procfsentries); |
1460 | int i; | 1460 | int i; |
1461 | 1461 | ||
1462 | for (i=0; i < nelem; i++) { | 1462 | for (i=0; i < nelem; i++) { |
@@ -1468,7 +1468,7 @@ static void __init proc_init(void) | |||
1468 | 1468 | ||
1469 | static void __exit proc_exit(void) | 1469 | static void __exit proc_exit(void) |
1470 | { | 1470 | { |
1471 | int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]); | 1471 | int nelem = ARRAY_SIZE(procfsentries); |
1472 | int i; | 1472 | int i; |
1473 | 1473 | ||
1474 | for (i=nelem-1; i >= 0; i--) { | 1474 | for (i=nelem-1; i >= 0; i--) { |
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c index c4d438c17dab..8cec9c3898ec 100644 --- a/drivers/isdn/capi/capidrv.c +++ b/drivers/isdn/capi/capidrv.c | |||
@@ -2218,7 +2218,7 @@ static struct procfsentries { | |||
2218 | 2218 | ||
2219 | static void __init proc_init(void) | 2219 | static void __init proc_init(void) |
2220 | { | 2220 | { |
2221 | int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]); | 2221 | int nelem = ARRAY_SIZE(procfsentries); |
2222 | int i; | 2222 | int i; |
2223 | 2223 | ||
2224 | for (i=0; i < nelem; i++) { | 2224 | for (i=0; i < nelem; i++) { |
@@ -2230,7 +2230,7 @@ static void __init proc_init(void) | |||
2230 | 2230 | ||
2231 | static void __exit proc_exit(void) | 2231 | static void __exit proc_exit(void) |
2232 | { | 2232 | { |
2233 | int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]); | 2233 | int nelem = ARRAY_SIZE(procfsentries); |
2234 | int i; | 2234 | int i; |
2235 | 2235 | ||
2236 | for (i=nelem-1; i >= 0; i--) { | 2236 | for (i=nelem-1; i >= 0; i--) { |