aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/acornfb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/acornfb.c')
-rw-r--r--drivers/video/acornfb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
index 76448d6ae896..98baecccb3fd 100644
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -1308,7 +1308,7 @@ static int __init acornfb_probe(struct platform_device *dev)
1308 /* 1308 /*
1309 * Try to select a suitable default mode 1309 * Try to select a suitable default mode
1310 */ 1310 */
1311 for (i = 0; i < sizeof(modedb) / sizeof(*modedb); i++) { 1311 for (i = 0; i < ARRAY_SIZE(modedb); i++) {
1312 unsigned long hs; 1312 unsigned long hs;
1313 1313
1314 hs = modedb[i].refresh * 1314 hs = modedb[i].refresh *
@@ -1380,7 +1380,7 @@ static int __init acornfb_probe(struct platform_device *dev)
1380 */ 1380 */
1381 free_unused_pages(PAGE_OFFSET + size, PAGE_OFFSET + MAX_SIZE); 1381 free_unused_pages(PAGE_OFFSET + size, PAGE_OFFSET + MAX_SIZE);
1382#endif 1382#endif
1383 1383
1384 fb_info.fix.smem_len = size; 1384 fb_info.fix.smem_len = size;
1385 current_par.palette_size = VIDC_PALETTE_SIZE; 1385 current_par.palette_size = VIDC_PALETTE_SIZE;
1386 1386
@@ -1391,7 +1391,7 @@ static int __init acornfb_probe(struct platform_device *dev)
1391 */ 1391 */
1392 do { 1392 do {
1393 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb, 1393 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb,
1394 sizeof(modedb) / sizeof(*modedb), 1394 ARRAY_SIZE(modedb),
1395 &acornfb_default_mode, DEFAULT_BPP); 1395 &acornfb_default_mode, DEFAULT_BPP);
1396 /* 1396 /*
1397 * If we found an exact match, all ok. 1397 * If we found an exact match, all ok.
@@ -1408,7 +1408,7 @@ static int __init acornfb_probe(struct platform_device *dev)
1408 break; 1408 break;
1409 1409
1410 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb, 1410 rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb,
1411 sizeof(modedb) / sizeof(*modedb), 1411 ARRAY_SIZE(modedb),
1412 &acornfb_default_mode, DEFAULT_BPP); 1412 &acornfb_default_mode, DEFAULT_BPP);
1413 if (rc) 1413 if (rc)
1414 break; 1414 break;