diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2006-03-27 04:17:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:58 -0500 |
commit | d1ae418eef4ce763a95edec0b5fc095af5daca2e (patch) | |
tree | 251158f7887435cd058293c2532eafd722adff3a /drivers/video/neofb.c | |
parent | b0c87978216836455ef5fbcac6df1ce6679750b0 (diff) |
[PATCH] drivers/video: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of ARRAY_SIZE. Some coding style and trailing whitespaces are
also fixed.
Compile-tested where possible (some are other arch or BROKEN)
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/neofb.c')
-rw-r--r-- | drivers/video/neofb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c index b961d5601bd9..24b12f71d5a8 100644 --- a/drivers/video/neofb.c +++ b/drivers/video/neofb.c | |||
@@ -165,20 +165,20 @@ static int neoFindMode(int xres, int yres, int depth) | |||
165 | 165 | ||
166 | switch (depth) { | 166 | switch (depth) { |
167 | case 8: | 167 | case 8: |
168 | size = sizeof(bios8) / sizeof(biosMode); | 168 | size = ARRAY_SIZE(bios8); |
169 | mode = bios8; | 169 | mode = bios8; |
170 | break; | 170 | break; |
171 | case 16: | 171 | case 16: |
172 | size = sizeof(bios16) / sizeof(biosMode); | 172 | size = ARRAY_SIZE(bios16); |
173 | mode = bios16; | 173 | mode = bios16; |
174 | break; | 174 | break; |
175 | case 24: | 175 | case 24: |
176 | size = sizeof(bios24) / sizeof(biosMode); | 176 | size = ARRAY_SIZE(bios24); |
177 | mode = bios24; | 177 | mode = bios24; |
178 | break; | 178 | break; |
179 | #ifdef NO_32BIT_SUPPORT_YET | 179 | #ifdef NO_32BIT_SUPPORT_YET |
180 | case 32: | 180 | case 32: |
181 | size = sizeof(bios32) / sizeof(biosMode); | 181 | size = ARRAY_SIZE(bios32); |
182 | mode = bios32; | 182 | mode = bios32; |
183 | break; | 183 | break; |
184 | #endif | 184 | #endif |