Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a8320b04c0762a1c65b5800b84023b454c2da54
Commit:     0a8320b04c0762a1c65b5800b84023b454c2da54
Parent:     b9e5e119fd9905c2a06f73a96f9c18aa760a8a65
Author:     Alejandro Martinez Ruiz <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:30:19 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:23 2008 -0800

    dio: ARRAY_SIZE() cleanup
    
    [Geert: eliminate NUMNAMES, as suggested by Richard Knutsson ]
    [EMAIL PROTECTED]: coding-syle fixes]
    Signed-off-by: Alejandro Martinez Ruiz <[EMAIL PROTECTED]>
    Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]>
    Cc: Richard Knutsson <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/dio/dio.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/dio/dio.c b/drivers/dio/dio.c
index 17502d6..07f274f 100644
--- a/drivers/dio/dio.c
+++ b/drivers/dio/dio.c
@@ -88,8 +88,6 @@ static struct dioname names[] =
 #undef DIONAME
 #undef DIOFBNAME
 
-#define NUMNAMES (sizeof(names) / sizeof(struct dioname))
-
 static const char *unknowndioname 
         = "unknown DIO board -- please email <[EMAIL PROTECTED]>!";
 
@@ -97,7 +95,7 @@ static const char *dio_getname(int id)
 {
         /* return pointer to a constant string describing the board with given 
ID */
        unsigned int i;
-        for (i = 0; i < NUMNAMES; i++)
+       for (i = 0; i < ARRAY_SIZE(names); i++)
                 if (names[i].id == id) 
                         return names[i].name;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to