X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Facornfb.c;h=61a8bf159cb0d2eb0464915b3be43ec7381c45fb;hb=2c4f365ad2361c93c097e958b2b0a7a112750228;hp=750cebb183063d6eee8b81c36daca65be32e2228;hpb=1ef43204f4bd24dcd3156185b19b31b6b4151ae9;p=linux-2.6 diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c index 750cebb183..61a8bf159c 100644 --- a/drivers/video/acornfb.c +++ b/drivers/video/acornfb.c @@ -17,7 +17,6 @@ * - Blanking 8bpp displays with VIDC */ -#include #include #include #include @@ -883,7 +882,7 @@ acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) * Note that we are entered with the kernel locked. */ static int -acornfb_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) +acornfb_mmap(struct fb_info *info, struct vm_area_struct *vma) { unsigned long off, start; u32 len; @@ -1269,7 +1268,7 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end) */ page = virt_to_page(virtual_start); ClearPageReserved(page); - set_page_count(page, 1); + init_page_count(page); free_page(virtual_start); virtual_start += PAGE_SIZE; @@ -1308,7 +1307,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 +1379,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 +1390,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 +1407,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;