diff options
Diffstat (limited to 'drivers/video/arcfb.c')
-rw-r--r-- | drivers/video/arcfb.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 30a8369757e7..db15baca3f7b 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, | |||
262 | ks108_set_yaddr(par, chipindex, upper/8); | 262 | ks108_set_yaddr(par, chipindex, upper/8); |
263 | 263 | ||
264 | linesize = par->info->var.xres/8; | 264 | linesize = par->info->var.xres/8; |
265 | src = par->info->screen_base + (left/8) + (upper * linesize); | 265 | src = (unsigned char __force *) par->info->screen_base + (left/8) + |
266 | (upper * linesize); | ||
266 | ks108_set_xaddr(par, chipindex, left); | 267 | ks108_set_xaddr(par, chipindex, left); |
267 | 268 | ||
268 | bitmask=1; | 269 | bitmask=1; |
@@ -368,7 +369,7 @@ static void arcfb_fillrect(struct fb_info *info, | |||
368 | { | 369 | { |
369 | struct arcfb_par *par = info->par; | 370 | struct arcfb_par *par = info->par; |
370 | 371 | ||
371 | cfb_fillrect(info, rect); | 372 | sys_fillrect(info, rect); |
372 | 373 | ||
373 | /* update the physical lcd */ | 374 | /* update the physical lcd */ |
374 | arcfb_lcd_update(par, rect->dx, rect->dy, rect->width, rect->height); | 375 | arcfb_lcd_update(par, rect->dx, rect->dy, rect->width, rect->height); |
@@ -379,7 +380,7 @@ static void arcfb_copyarea(struct fb_info *info, | |||
379 | { | 380 | { |
380 | struct arcfb_par *par = info->par; | 381 | struct arcfb_par *par = info->par; |
381 | 382 | ||
382 | cfb_copyarea(info, area); | 383 | sys_copyarea(info, area); |
383 | 384 | ||
384 | /* update the physical lcd */ | 385 | /* update the physical lcd */ |
385 | arcfb_lcd_update(par, area->dx, area->dy, area->width, area->height); | 386 | 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) | |||
389 | { | 390 | { |
390 | struct arcfb_par *par = info->par; | 391 | struct arcfb_par *par = info->par; |
391 | 392 | ||
392 | cfb_imageblit(info, image); | 393 | sys_imageblit(info, image); |
393 | 394 | ||
394 | /* update the physical lcd */ | 395 | /* update the physical lcd */ |
395 | arcfb_lcd_update(par, image->dx, image->dy, image->width, | 396 | arcfb_lcd_update(par, image->dx, image->dy, image->width, |
@@ -439,14 +440,11 @@ static int arcfb_ioctl(struct fb_info *info, | |||
439 | * the fb. it's inefficient for them to do anything less than 64*8 | 440 | * the fb. it's inefficient for them to do anything less than 64*8 |
440 | * writes since we update the lcd in each write() anyway. | 441 | * writes since we update the lcd in each write() anyway. |
441 | */ | 442 | */ |
442 | static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t count, | 443 | static ssize_t arcfb_write(struct fb_info *info, const char __user *buf, |
443 | loff_t *ppos) | 444 | size_t count, loff_t *ppos) |
444 | { | 445 | { |
445 | /* modded from epson 1355 */ | 446 | /* modded from epson 1355 */ |
446 | 447 | ||
447 | struct inode *inode; | ||
448 | int fbidx; | ||
449 | struct fb_info *info; | ||
450 | unsigned long p; | 448 | unsigned long p; |
451 | int err=-EINVAL; | 449 | int err=-EINVAL; |
452 | unsigned int fbmemlength,x,y,w,h, bitppos, startpos, endpos, bitcount; | 450 | 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 | |||
454 | unsigned int xres; | 452 | unsigned int xres; |
455 | 453 | ||
456 | p = *ppos; | 454 | p = *ppos; |
457 | inode = file->f_path.dentry->d_inode; | ||
458 | fbidx = iminor(inode); | ||
459 | info = registered_fb[fbidx]; | ||
460 | |||
461 | if (!info || !info->screen_base) | ||
462 | return -ENODEV; | ||
463 | |||
464 | par = info->par; | 455 | par = info->par; |
465 | xres = info->var.xres; | 456 | xres = info->var.xres; |
466 | fbmemlength = (xres * info->var.yres)/8; | 457 | 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 | |||
477 | if (count) { | 468 | if (count) { |
478 | char *base_addr; | 469 | char *base_addr; |
479 | 470 | ||
480 | base_addr = info->screen_base; | 471 | base_addr = (char __force *)info->screen_base; |
481 | count -= copy_from_user(base_addr + p, buf, count); | 472 | count -= copy_from_user(base_addr + p, buf, count); |
482 | *ppos += count; | 473 | *ppos += count; |
483 | err = -EFAULT; | 474 | err = -EFAULT; |
@@ -503,6 +494,7 @@ static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou | |||
503 | static struct fb_ops arcfb_ops = { | 494 | static struct fb_ops arcfb_ops = { |
504 | .owner = THIS_MODULE, | 495 | .owner = THIS_MODULE, |
505 | .fb_open = arcfb_open, | 496 | .fb_open = arcfb_open, |
497 | .fb_read = fb_sys_read, | ||
506 | .fb_write = arcfb_write, | 498 | .fb_write = arcfb_write, |
507 | .fb_release = arcfb_release, | 499 | .fb_release = arcfb_release, |
508 | .fb_pan_display = arcfb_pan_display, | 500 | .fb_pan_display = arcfb_pan_display, |
@@ -603,7 +595,7 @@ static int arcfb_remove(struct platform_device *dev) | |||
603 | 595 | ||
604 | if (info) { | 596 | if (info) { |
605 | unregister_framebuffer(info); | 597 | unregister_framebuffer(info); |
606 | vfree(info->screen_base); | 598 | vfree((void __force *)info->screen_base); |
607 | framebuffer_release(info); | 599 | framebuffer_release(info); |
608 | } | 600 | } |
609 | return 0; | 601 | return 0; |