]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/dio/dio.c
memory hotplug: fix page_zone() calculation in test_pages_isolated()
[linux-2.6-omap-h63xx.git] / drivers / dio / dio.c
index 17502d6efae788c2bb614f3833a550de9059a59c..07f274f853d95f5dc0cf8b671e989fca3a65742f 100644 (file)
@@ -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 <linux-m68k@lists.linux-m68k.org>!";
 
@@ -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;