linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / video / acornfb.c
index 61a8bf1..b058273 100644 (file)
@@ -17,6 +17,7 @@
  *  - Blanking 8bpp displays with VIDC
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -1268,7 +1269,7 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end)
                 */
                page = virt_to_page(virtual_start);
                ClearPageReserved(page);
-               init_page_count(page);
+               set_page_count(page, 1);
                free_page(virtual_start);
 
                virtual_start += PAGE_SIZE;
@@ -1307,7 +1308,7 @@ static int __init acornfb_probe(struct platform_device *dev)
        /*
         * Try to select a suitable default mode
         */
-       for (i = 0; i < ARRAY_SIZE(modedb); i++) {
+       for (i = 0; i < sizeof(modedb) / sizeof(*modedb); i++) {
                unsigned long hs;
 
                hs = modedb[i].refresh *
@@ -1379,7 +1380,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;
 
@@ -1390,7 +1391,7 @@ static int __init acornfb_probe(struct platform_device *dev)
         */
        do {
                rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb,
-                                ARRAY_SIZE(modedb),
+                                sizeof(modedb) / sizeof(*modedb),
                                 &acornfb_default_mode, DEFAULT_BPP);
                /*
                 * If we found an exact match, all ok.
@@ -1407,7 +1408,7 @@ static int __init acornfb_probe(struct platform_device *dev)
                        break;
 
                rc = fb_find_mode(&fb_info.var, &fb_info, NULL, modedb,
-                                ARRAY_SIZE(modedb),
+                                sizeof(modedb) / sizeof(*modedb),
                                 &acornfb_default_mode, DEFAULT_BPP);
                if (rc)
                        break;