Miguel Ojeda has moved
[sfrench/cifs-2.6.git] / drivers / auxdisplay / cfag12864bfb.c
index 94765e78315f07d01b2625bf131916ac837614d8..fe3a865be4e556c615fbac9fd49cae7bfcaf444d 100644 (file)
@@ -5,7 +5,7 @@
  *     License: GPLv2
  *     Depends: cfag12864b
  *
- *      Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
+ *      Author: Copyright (C) Miguel Ojeda Sandonis
  *        Date: 2006-10-31
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -73,9 +73,11 @@ static int cfag12864bfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
 
 static struct fb_ops cfag12864bfb_ops = {
        .owner = THIS_MODULE,
-       .fb_fillrect = cfb_fillrect,
-       .fb_copyarea = cfb_copyarea,
-       .fb_imageblit = cfb_imageblit,
+       .fb_read = fb_sys_read,
+       .fb_write = fb_sys_write,
+       .fb_fillrect = sys_fillrect,
+       .fb_copyarea = sys_copyarea,
+       .fb_imageblit = sys_imageblit,
        .fb_mmap = cfag12864bfb_mmap,
 };
 
@@ -137,7 +139,14 @@ static struct platform_device *cfag12864bfb_device;
 
 static int __init cfag12864bfb_init(void)
 {
-       int ret;
+       int ret = -EINVAL;
+
+       /* cfag12864b_init() must be called first */
+       if (!cfag12864b_isinited()) {
+               printk(KERN_ERR CFAG12864BFB_NAME ": ERROR: "
+                       "cfag12864b is not initialized\n");
+               goto none;
+       }
 
        if (cfag12864b_enable()) {
                printk(KERN_ERR CFAG12864BFB_NAME ": ERROR: "
@@ -162,6 +171,7 @@ static int __init cfag12864bfb_init(void)
                }
        }
 
+none:
        return ret;
 }
 
@@ -176,5 +186,5 @@ module_init(cfag12864bfb_init);
 module_exit(cfag12864bfb_exit);
 
 MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>");
+MODULE_AUTHOR("Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>");
 MODULE_DESCRIPTION("cfag12864b LCD framebuffer driver");