X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Facornfb.c;h=017233d0c48131d67bc635eb6309cc84c27b245f;hb=e9f76354ce83a20c7768ad37caa033f6506b4f96;hp=76448d6ae896baf71d269cae34b507135ec961d7;hpb=2e6e33bab6e1996a5dec9108fb467b52b841e7a8;p=linux-2.6 diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c index 76448d6ae8..017233d0c4 100644 --- a/drivers/video/acornfb.c +++ b/drivers/video/acornfb.c @@ -17,13 +17,13 @@ * - Blanking 8bpp displays with VIDC */ -#include #include #include #include #include #include #include +#include #include #include #include @@ -139,17 +139,6 @@ static struct pixclock arc_clocks[] = { { 41250, 42083, VIDC_CTRL_DIV1, VID_CTL_24MHz }, /* 24.000MHz */ }; -#ifdef CONFIG_ARCH_A5K -static struct pixclock a5k_clocks[] = { - { 117974, 120357, VIDC_CTRL_DIV3, VID_CTL_25MHz }, /* 8.392MHz */ - { 78649, 80238, VIDC_CTRL_DIV2, VID_CTL_25MHz }, /* 12.588MHz */ - { 58987, 60178, VIDC_CTRL_DIV1_5, VID_CTL_25MHz }, /* 16.588MHz */ - { 55000, 56111, VIDC_CTRL_DIV2, VID_CTL_36MHz }, /* 18.000MHz */ - { 39325, 40119, VIDC_CTRL_DIV1, VID_CTL_25MHz }, /* 25.175MHz */ - { 27500, 28055, VIDC_CTRL_DIV1, VID_CTL_36MHz }, /* 36.000MHz */ -}; -#endif - static struct pixclock * acornfb_valid_pixrate(struct fb_var_screeninfo *var) { @@ -164,15 +153,6 @@ acornfb_valid_pixrate(struct fb_var_screeninfo *var) pixclock < arc_clocks[i].max_clock) return arc_clocks + i; -#ifdef CONFIG_ARCH_A5K - if (machine_is_a5k()) { - for (i = 0; i < ARRAY_SIZE(a5k_clocks); i++) - if (pixclock > a5k_clocks[i].min_clock && - pixclock < a5k_clocks[i].max_clock) - return a5k_clocks + i; - } -#endif - return NULL; } @@ -1308,7 +1288,7 @@ static int __init acornfb_probe(struct platform_device *dev) /* * Try to select a suitable default mode */ - for (i = 0; i < sizeof(modedb) / sizeof(*modedb); i++) { + for (i = 0; i < ARRAY_SIZE(modedb); i++) { unsigned long hs; hs = modedb[i].refresh * @@ -1380,7 +1360,7 @@ static int __init acornfb_probe(struct platform_device *dev) */ free_unused_pages(PAGE_OFFSET + size, PAGE_OFFSET + MAX_SIZE); #endif - + fb_info.fix.smem_len = size; current_par.palette_size = VIDC_PALETTE_SIZE; @@ -1391,7 +1371,7 @@ static int __init acornfb_probe(struct platform_device *dev) */ do { rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb, - sizeof(modedb) / sizeof(*modedb), + ARRAY_SIZE(modedb), &acornfb_default_mode, DEFAULT_BPP); /* * If we found an exact match, all ok. @@ -1408,7 +1388,7 @@ static int __init acornfb_probe(struct platform_device *dev) break; rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb, - sizeof(modedb) / sizeof(*modedb), + ARRAY_SIZE(modedb), &acornfb_default_mode, DEFAULT_BPP); if (rc) break;