[DRIVER MODEL] Convert platform drivers to use struct platform_driver
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / video / acornfb.c
index 193b482570c7e9cc1ee41303ad67d5871b37db90..750cebb183063d6eee8b81c36daca65be32e2228 100644 (file)
@@ -1279,7 +1279,7 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end)
        printk("acornfb: freed %dK memory\n", mb_freed);
 }
 
-static int __init acornfb_probe(struct device *dev)
+static int __init acornfb_probe(struct platform_device *dev)
 {
        unsigned long size;
        u_int h_sync, v_sync;
@@ -1292,7 +1292,7 @@ static int __init acornfb_probe(struct device *dev)
 
        acornfb_init_fbinfo();
 
-       current_par.dev = dev;
+       current_par.dev = &dev->dev;
 
        if (current_par.montype == -1)
                current_par.montype = acornfb_detect_monitortype();
@@ -1453,15 +1453,16 @@ static int __init acornfb_probe(struct device *dev)
        return 0;
 }
 
-static struct device_driver acornfb_driver = {
-       .name   = "acornfb",
-       .bus    = &platform_bus_type,
+static struct platform_driver acornfb_driver = {
        .probe  = acornfb_probe,
+       .driver = {
+               .name   = "acornfb",
+       },
 };
 
 static int __init acornfb_init(void)
 {
-       return driver_register(&acornfb_driver);
+       return platform_driver_register(&acornfb_driver);
 }
 
 module_init(acornfb_init);