include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / video / arcfb.c
index 66e0bd1..8d406fb 100644 (file)
@@ -39,7 +39,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
@@ -48,7 +47,7 @@
 #include <linux/arcfb.h>
 #include <linux/platform_device.h>
 
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 #define floor8(a) (a&(~0x07))
 #define floorXres(a,xres) (a&(~(xres - 1)))
@@ -369,7 +368,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);
@@ -380,7 +379,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);
@@ -390,7 +389,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,
@@ -440,14 +439,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;
@@ -455,13 +451,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;
@@ -504,6 +493,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,
@@ -513,7 +503,7 @@ static struct fb_ops arcfb_ops = {
        .fb_ioctl       = arcfb_ioctl,
 };
 
-static int __init arcfb_probe(struct platform_device *dev)
+static int __devinit arcfb_probe(struct platform_device *dev)
 {
        struct fb_info *info;
        int retval = -ENOMEM;