[PATCH] isdn/capi: use ARRAY_SIZE when appropriate
authorAhmed S. Darwish <[email protected]>
Mon, 12 Feb 2007 08:53:19 +0000 (00:53 -0800)
committerLinus Torvalds <[email protected]>
Mon, 12 Feb 2007 17:48:34 +0000 (09:48 -0800)
Signed-off-by: Ahmed S. Darwish <[email protected]>
Acked-by: Karsten Keil <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/isdn/capi/capi.c
drivers/isdn/capi/capidrv.c

index d22c0224fde6505e9695e9c702ab42c4e3d7aaf4..38045910ca944ade53b9444c950d904993f347b6 100644 (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--) {
index c4d438c17dabf0cd1a1bbb06a1fda9953cce25e2..8cec9c3898ec809c0d5e56dd6ad97a5b5e8d131d 100644 (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--) {