vserver 1.9.5.x5
[linux-2.6.git] / drivers / video / acornfb.c
index f7bfbc7..9e1a835 100644 (file)
@@ -1280,13 +1280,7 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end)
        printk("acornfb: freed %dK memory\n", mb_freed);
 }
 
-static struct device acornfb_device = {
-       .bus_id                 = "acornfb",
-       .coherent_dma_mask      = 0xffffffff,
-};
-
-int __init
-acornfb_init(void)
+static int __init acornfb_probe(struct device *dev)
 {
        unsigned long size;
        u_int h_sync, v_sync;
@@ -1299,7 +1293,7 @@ acornfb_init(void)
 
        acornfb_init_fbinfo();
 
-       current_par.dev = &acornfb_device;
+       current_par.dev = dev;
 
        if (current_par.montype == -1)
                current_par.montype = acornfb_detect_monitortype();
@@ -1332,7 +1326,6 @@ acornfb_init(void)
                }
        }
 
-       fb_info.currcon        = -1;
        fb_info.screen_base    = (char *)SCREEN_BASE;
        fb_info.fix.smem_start = SCREEN_START;
        current_par.using_vram = 0;
@@ -1461,6 +1454,17 @@ acornfb_init(void)
        return 0;
 }
 
+static struct device_driver acornfb_driver = {
+       .name   = "acornfb",
+       .bus    = &platform_bus_type,
+       .probe  = acornfb_probe,
+};
+
+static int __init acornfb_init(void)
+{
+       return driver_register(&acornfb_driver);
+}
+
 module_init(acornfb_init);
 
 MODULE_AUTHOR("Russell King");