[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>
This commit is contained in:
Ahmed S. Darwish 2007-02-12 00:53:19 -08:00 committed by Linus Torvalds
parent fc238b3791
commit fd863db937
2 changed files with 4 additions and 4 deletions

View File

@ -1456,7 +1456,7 @@ static struct procfsentries {
static void __init proc_init(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int nelem = ARRAY_SIZE(procfsentries);
int i;
for (i=0; i < nelem; i++) {
@ -1468,7 +1468,7 @@ static void __init proc_init(void)
static void __exit proc_exit(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int nelem = ARRAY_SIZE(procfsentries);
int i;
for (i=nelem-1; i >= 0; i--) {

View File

@ -2218,7 +2218,7 @@ static struct procfsentries {
static void __init proc_init(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int nelem = ARRAY_SIZE(procfsentries);
int i;
for (i=0; i < nelem; i++) {
@ -2230,7 +2230,7 @@ static void __init proc_init(void)
static void __exit proc_exit(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int nelem = ARRAY_SIZE(procfsentries);
int i;
for (i=nelem-1; i >= 0; i--) {