]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/sgivwfb.c
Pull mca-check-psp into release branch
[linux-2.6-omap-h63xx.git] / drivers / video / sgivwfb.c
index cf5106eab2d583ee387a9496bae2bc2373739f62..2e8769dd345a8ec0cedf06b3e7a0c1a857c3a19a 100644 (file)
@@ -126,7 +126,6 @@ static struct fb_ops sgivwfb_ops = {
        .fb_fillrect    = cfb_fillrect,
        .fb_copyarea    = cfb_copyarea,
        .fb_imageblit   = cfb_imageblit,
-       .fb_cursor      = soft_cursor,
        .fb_mmap        = sgivwfb_mmap,
 };
 
@@ -751,10 +750,6 @@ int __init sgivwfb_setup(char *options)
 /*
  *  Initialisation
  */
-static void sgivwfb_release(struct device *device)
-{
-}
-
 static int __init sgivwfb_probe(struct device *device)
 {
        struct platform_device *dev = to_platform_device(device);
@@ -859,13 +854,7 @@ static struct device_driver sgivwfb_driver = {
        .remove = sgivwfb_remove,
 };
 
-static struct platform_device sgivwfb_device = {
-       .name   = "sgivwfb",
-       .id     = 0,
-       .dev    = {
-               .release = sgivwfb_release,
-       }
-};
+static struct platform_device *sgivwfb_device;
 
 int __init sgivwfb_init(void)
 {
@@ -880,9 +869,15 @@ int __init sgivwfb_init(void)
 #endif
        ret = driver_register(&sgivwfb_driver);
        if (!ret) {
-               ret = platform_device_register(&sgivwfb_device);
-               if (ret)
+               sgivwfb_device = platform_device_alloc("sgivwfb", 0);
+               if (sgivwfb_device) {
+                       ret = platform_device_add(sgivwfb_device);
+               } else
+                       ret = -ENOMEM;
+               if (ret) {
                        driver_unregister(&sgivwfb_driver);
+                       platform_device_put(sgivwfb_device);
+               }
        }
        return ret;
 }
@@ -894,7 +889,7 @@ MODULE_LICENSE("GPL");
 
 static void __exit sgivwfb_exit(void)
 {
-       platform_device_unregister(&sgivwfb_device);
+       platform_device_unregister(sgivwfb_device);
        driver_unregister(&sgivwfb_driver);
 }