X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fvideo%2Farcfb.c;h=db15baca3f7b01a6d3d5c934490ffb5b57ab756a;hb=bc0ca06e24545117b69c94b1219dbe19392a0c5a;hp=30a8369757e7ceca4b2a82ef49c98f7f9cb05cf3;hpb=eb991b39385c7b04923d701764a34694ec54b53d;p=powerpc.git diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 30a8369757..db15baca3f 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c @@ -262,7 +262,8 @@ static void arcfb_lcd_update_page(struct arcfb_par *par, unsigned int upper, ks108_set_yaddr(par, chipindex, upper/8); linesize = par->info->var.xres/8; - src = par->info->screen_base + (left/8) + (upper * linesize); + src = (unsigned char __force *) par->info->screen_base + (left/8) + + (upper * linesize); ks108_set_xaddr(par, chipindex, left); bitmask=1; @@ -368,7 +369,7 @@ static void arcfb_fillrect(struct fb_info *info, { struct arcfb_par *par = info->par; - cfb_fillrect(info, rect); + sys_fillrect(info, rect); /* update the physical lcd */ arcfb_lcd_update(par, rect->dx, rect->dy, rect->width, rect->height); @@ -379,7 +380,7 @@ static void arcfb_copyarea(struct fb_info *info, { struct arcfb_par *par = info->par; - cfb_copyarea(info, area); + sys_copyarea(info, area); /* update the physical lcd */ arcfb_lcd_update(par, area->dx, area->dy, area->width, area->height); @@ -389,7 +390,7 @@ static void arcfb_imageblit(struct fb_info *info, const struct fb_image *image) { struct arcfb_par *par = info->par; - cfb_imageblit(info, image); + sys_imageblit(info, image); /* update the physical lcd */ arcfb_lcd_update(par, image->dx, image->dy, image->width, @@ -439,14 +440,11 @@ static int arcfb_ioctl(struct fb_info *info, * the fb. it's inefficient for them to do anything less than 64*8 * writes since we update the lcd in each write() anyway. */ -static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t count, - loff_t *ppos) +static ssize_t arcfb_write(struct fb_info *info, const char __user *buf, + size_t count, loff_t *ppos) { /* modded from epson 1355 */ - struct inode *inode; - int fbidx; - struct fb_info *info; unsigned long p; int err=-EINVAL; unsigned int fbmemlength,x,y,w,h, bitppos, startpos, endpos, bitcount; @@ -454,13 +452,6 @@ static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou unsigned int xres; p = *ppos; - inode = file->f_path.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; @@ -477,7 +468,7 @@ static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou 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; @@ -503,6 +494,7 @@ static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou static struct fb_ops arcfb_ops = { .owner = THIS_MODULE, .fb_open = arcfb_open, + .fb_read = fb_sys_read, .fb_write = arcfb_write, .fb_release = arcfb_release, .fb_pan_display = arcfb_pan_display, @@ -603,7 +595,7 @@ static int arcfb_remove(struct platform_device *dev) if (info) { unregister_framebuffer(info); - vfree(info->screen_base); + vfree((void __force *)info->screen_base); framebuffer_release(info); } return 0;