Pull netlink into release branch
[pandora-kernel.git] / drivers / auxdisplay / cfag12864bfb.c
index 94765e7..307c190 100644 (file)
@@ -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;
 }