X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fvideo%2Fhecubafb.c;h=94e0df8a6f60bc9b80d05586b1337fad1006cc47;hb=1942971b20817def5fd1142248307c7c3c51fc8a;hp=ea5a6c9e2c4e419bb5f7246c40183be3be04c91a;hpb=9a268a629be4c15ed85c88a61d712d92aa943847;p=mv-sheeva.git diff --git a/drivers/video/hecubafb.c b/drivers/video/hecubafb.c index ea5a6c9e2c4..94e0df8a6f6 100644 --- a/drivers/video/hecubafb.c +++ b/drivers/video/hecubafb.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include /* Apollo controller specific defines */ #define APOLLO_START_NEW_IMG 0xA0 @@ -214,7 +214,7 @@ static void apollo_send_command(struct hecubafb_par *par, unsigned char data) static void hecubafb_dpy_update(struct hecubafb_par *par) { int i; - unsigned char *buf = par->info->screen_base; + unsigned char *buf = (unsigned char __force *)par->info->screen_base; apollo_send_command(par, 0xA0); @@ -238,7 +238,7 @@ static void hecubafb_fillrect(struct fb_info *info, { struct hecubafb_par *par = info->par; - cfb_fillrect(info, rect); + sys_fillrect(info, rect); hecubafb_dpy_update(par); } @@ -248,7 +248,7 @@ static void hecubafb_copyarea(struct fb_info *info, { struct hecubafb_par *par = info->par; - cfb_copyarea(info, area); + sys_copyarea(info, area); hecubafb_dpy_update(par); } @@ -258,7 +258,7 @@ static void hecubafb_imageblit(struct fb_info *info, { struct hecubafb_par *par = info->par; - cfb_imageblit(info, image); + sys_imageblit(info, image); hecubafb_dpy_update(par); } @@ -267,12 +267,9 @@ static void hecubafb_imageblit(struct fb_info *info, * this is the slow path from userspace. they can seek and write to * the fb. it's inefficient to do anything less than a full screen draw */ -static ssize_t hecubafb_write(struct file *file, const char __user *buf, +static ssize_t hecubafb_write(struct fb_info *info, const char __user *buf, size_t count, loff_t *ppos) { - struct inode *inode; - int fbidx; - struct fb_info *info; unsigned long p; int err=-EINVAL; struct hecubafb_par *par; @@ -280,13 +277,6 @@ static ssize_t hecubafb_write(struct file *file, const char __user *buf, unsigned int fbmemlength; p = *ppos; - inode = file->f_dentry->d_inode; - fbidx = iminor(inode); - info = registered_fb[fbidx]; - - if (!info || !info->screen_base) - return -ENODEV; - par = info->par; xres = info->var.xres; fbmemlength = (xres * info->var.yres)/8; @@ -303,7 +293,7 @@ static ssize_t hecubafb_write(struct file *file, const char __user *buf, if (count) { char *base_addr; - base_addr = info->screen_base; + base_addr = (char __force *)info->screen_base; count -= copy_from_user(base_addr + p, buf, count); *ppos += count; err = -EFAULT; @@ -319,6 +309,7 @@ static ssize_t hecubafb_write(struct file *file, const char __user *buf, static struct fb_ops hecubafb_ops = { .owner = THIS_MODULE, + .fb_read = fb_sys_read, .fb_write = hecubafb_write, .fb_fillrect = hecubafb_fillrect, .fb_copyarea = hecubafb_copyarea, @@ -409,7 +400,7 @@ static int __devexit hecubafb_remove(struct platform_device *dev) if (info) { fb_deferred_io_cleanup(info); unregister_framebuffer(info); - vfree(info->screen_base); + vfree((void __force *)info->screen_base); framebuffer_release(info); } return 0;