X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fdio%2Fdio.c;h=07f274f853d95f5dc0cf8b671e989fca3a65742f;hb=6f585e01614f38195599c1bc5379d3c9dae6be47;hp=17502d6efae788c2bb614f3833a550de9059a59c;hpb=c7c6e9494cc9a4a5b1a2ca870ed4531ad2b98a83;p=linux-2.6-omap-h63xx.git diff --git a/drivers/dio/dio.c b/drivers/dio/dio.c index 17502d6efae..07f274f853d 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 !"; @@ -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;