projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9e5e11
)
dio: ARRAY_SIZE() cleanup
author
Alejandro Martinez Ruiz
<
[email protected]
>
Tue, 5 Feb 2008 06:30:19 +0000
(22:30 -0800)
committer
Linus Torvalds
<
[email protected]
>
Tue, 5 Feb 2008 17:44:23 +0000
(09:44 -0800)
[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
patch
|
blob
|
history
diff --git
a/drivers/dio/dio.c
b/drivers/dio/dio.c
index 17502d6efae788c2bb614f3833a550de9059a59c..07f274f853d95f5dc0cf8b671e989fca3a65742f 100644
(file)
--- 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;