X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fauxdisplay%2Fcfag12864bfb.c;h=307c190699e04193815004207549a5f7d8706284;hb=61a517a063abf659cbf61df11f8e2131fdafccec;hp=94765e78315f07d01b2625bf131916ac837614d8;hpb=d68798374bcf5cd4a19105b86d96121651b3c8cb;p=linux-2.6 diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c index 94765e7831..307c190699 100644 --- a/drivers/auxdisplay/cfag12864bfb.c +++ b/drivers/auxdisplay/cfag12864bfb.c @@ -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; }