Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / video / p9100.c
index 7808a01..0d19575 100644 (file)
@@ -31,9 +31,8 @@ static int p9100_setcolreg(unsigned, unsigned, unsigned, unsigned,
                           unsigned, struct fb_info *);
 static int p9100_blank(int, struct fb_info *);
 
-static int p9100_mmap(struct fb_info *, struct file *, struct vm_area_struct *);
-static int p9100_ioctl(struct inode *, struct file *, unsigned int,
-                      unsigned long, struct fb_info *);
+static int p9100_mmap(struct fb_info *, struct vm_area_struct *);
+static int p9100_ioctl(struct fb_info *, unsigned int, unsigned long);
 
 /*
  *  Frame buffer operations
@@ -48,7 +47,9 @@ static struct fb_ops p9100_ops = {
        .fb_imageblit           = cfb_imageblit,
        .fb_mmap                = p9100_mmap,
        .fb_ioctl               = p9100_ioctl,
-       .fb_cursor              = soft_cursor,
+#ifdef CONFIG_COMPAT
+       .fb_compat_ioctl        = sbusfb_compat_ioctl,
+#endif
 };
 
 /* P9100 control registers */
@@ -138,7 +139,6 @@ struct p9100_par {
        unsigned long           fbsize;
 
        struct sbus_dev         *sdev;
-       struct list_head        list;
 };
 
 /**
@@ -221,7 +221,7 @@ static struct sbus_mmap_map p9100_mmap_map[] = {
        { 0,                    0,              0                   }
 };
 
-static int p9100_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma)
+static int p9100_mmap(struct fb_info *info, struct vm_area_struct *vma)
 {
        struct p9100_par *par = (struct p9100_par *)info->par;
 
@@ -231,8 +231,8 @@ static int p9100_mmap(struct fb_info *info, struct file *file, struct vm_area_st
                                  vma);
 }
 
-static int p9100_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-                      unsigned long arg, struct fb_info *info)
+static int p9100_ioctl(struct fb_info *info, unsigned int cmd,
+                      unsigned long arg)
 {
        struct p9100_par *par = (struct p9100_par *) info->par;
 
@@ -288,6 +288,9 @@ static void p9100_init_one(struct sbus_dev *sdev)
        all->par.physbase = sdev->reg_addrs[2].phys_addr;
 
        sbusfb_fill_var(&all->info.var, sdev->prom_node, 8);
+       all->info.var.red.length = 8;
+       all->info.var.green.length = 8;
+       all->info.var.blue.length = 8;
 
        linebytes = prom_getintdefault(sdev->prom_node, "linebytes",
                                       all->info.var.xres);
@@ -323,6 +326,7 @@ static void p9100_init_one(struct sbus_dev *sdev)
                kfree(all);
                return;
        }
+       fb_set_cmap(&all->info.cmap, &all->info);
 
        list_add(&all->list, &p9100_list);