X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fauxdisplay%2Fcfag12864bfb.c;h=307c190699e04193815004207549a5f7d8706284;hb=8babfa4fb9bfe93d57c700410a4f8be9fbd3edd7;hp=94765e78315f07d01b2625bf131916ac837614d8;hpb=f8abea8f8c24ecdad6d6861bffb912f23f2741cd;p=linux-2.6-omap-h63xx.git diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c index 94765e78315..307c190699e 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; }