]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] fbdev: Sanitize ->fb_ioctl prototype
authorChristoph Hellwig <hch@lst.de>
Sat, 14 Jan 2006 21:21:25 +0000 (13:21 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 15 Jan 2006 02:27:14 +0000 (18:27 -0800)
The ioctl and file arguments to ->fb_mmap are totally unused and there's not
reason a driver should need them.

Also update the ->fb_compat_ioctl prototype to be the same as ->fb_mmap.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
27 files changed:
drivers/video/amifb.c
drivers/video/arcfb.c
drivers/video/atafb.c
drivers/video/aty/aty128fb.c
drivers/video/aty/atyfb_base.c
drivers/video/aty/radeon_base.c
drivers/video/bw2.c
drivers/video/cg14.c
drivers/video/cg3.c
drivers/video/cg6.c
drivers/video/fbmem.c
drivers/video/ffb.c
drivers/video/imsttfb.c
drivers/video/intelfb/intelfbdrv.c
drivers/video/kyro/fbdev.c
drivers/video/leo.c
drivers/video/matrox/matroxfb_base.c
drivers/video/matrox/matroxfb_crtc2.c
drivers/video/p9100.c
drivers/video/pm3fb.c
drivers/video/pmag-aa-fb.c
drivers/video/radeonfb.c
drivers/video/sis/sis_main.c
drivers/video/sis/sis_main.h
drivers/video/sstfb.c
drivers/video/tcx.c
include/linux/fb.h

index 2c42a812655a14a977e963a7aeb7bb0898afec01..3033c72dea200ae7252170ee36efb882be662782 100644 (file)
@@ -1131,9 +1131,7 @@ static void amifb_copyarea(struct fb_info *info,
                           const struct fb_copyarea *region);
 static void amifb_imageblit(struct fb_info *info,
                            const struct fb_image *image);
-static int amifb_ioctl(struct inode *inode, struct file *file,
-                      unsigned int cmd, unsigned long arg,
-                      struct fb_info *info);
+static int amifb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
 
 
        /*
@@ -2172,9 +2170,8 @@ static void amifb_imageblit(struct fb_info *info, const struct fb_image *image)
         * Amiga Frame Buffer Specific ioctls
         */
 
-static int amifb_ioctl(struct inode *inode, struct file *file,
-                      unsigned int cmd, unsigned long arg,
-                      struct fb_info *info)
+static int amifb_ioctl(struct fb_info *info,
+                      unsigned int cmd, unsigned long arg)
 {
        union {
                struct fb_fix_cursorinfo fix;
index 89060b2db8e5f1bf5c6aae4d10eb0f8899927a7a..df8e5667b348efa317be6d5732e2e478162d0e22 100644 (file)
@@ -399,9 +399,8 @@ static void arcfb_imageblit(struct fb_info *info, const struct fb_image *image)
                                image->height);
 }
 
-static int arcfb_ioctl(struct inode *inode, struct file *file,
-                         unsigned int cmd, unsigned long arg,
-                         struct fb_info *info)
+static int arcfb_ioctl(struct fb_info *info,
+                         unsigned int cmd, unsigned long arg)
 {
        void __user *argp = (void __user *)arg;
        struct arcfb_par *par = info->par;
index 15ec1295bc294eefea5a3d8ba049467a2f336f48..e69ab65f7843b99c6ee37f3284d8a3fa47777b27 100644 (file)
@@ -2571,8 +2571,7 @@ atafb_pan_display(struct fb_var_screeninfo *var, int con, struct fb_info *info)
 }
 
 static int
-atafb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-              unsigned long arg, int con, struct fb_info *info)
+atafb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
 {
        switch (cmd) {
 #ifdef FBCMD_GET_CURRENTPAR
index e686185a076d0ee52fabf164f8fa39abc9a66a0c..bfc8a93b2c73baad26e81a034961c70df0999186 100644 (file)
@@ -431,8 +431,7 @@ static int aty128fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
 static int aty128fb_pan_display(struct fb_var_screeninfo *var,
                           struct fb_info *fb);
 static int aty128fb_blank(int blank, struct fb_info *fb);
-static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
-                         u_long arg, struct fb_info *info);
+static int aty128fb_ioctl(struct fb_info *info, u_int cmd, unsigned long arg);
 static int aty128fb_sync(struct fb_info *info);
 
     /*
@@ -2108,8 +2107,7 @@ static int aty128fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
 /* in param: u32*      backlight value: 0 to 15 */
 #define FBIO_ATY128_SET_MIRROR _IOW('@', 2, __u32)
 
-static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
-                         u_long arg, struct fb_info *info)
+static int aty128fb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
 {
        struct aty128fb_par *par = info->par;
        u32 value;
index ed81005cbdba51cdf2fd06c318083fa063cb839c..75b463ad4c75c89f85efae5d85256bcbfe1cbc7d 100644 (file)
@@ -238,8 +238,7 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
        u_int transp, struct fb_info *info);
 static int atyfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info);
 static int atyfb_blank(int blank, struct fb_info *info);
-static int atyfb_ioctl(struct inode *inode, struct file *file, u_int cmd,
-       u_long arg, struct fb_info *info);
+static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg);
 extern void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
 extern void atyfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);
 extern void atyfb_imageblit(struct fb_info *info, const struct fb_image *image);
@@ -1739,8 +1738,7 @@ struct atyclk {
 #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
 #endif
 
-static int atyfb_ioctl(struct inode *inode, struct file *file, u_int cmd,
-       u_long arg, struct fb_info *info)
+static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
 {
        struct atyfb_par *par = (struct atyfb_par *) info->par;
 #ifdef __sparc__
index 156db84cb36371aa4709b293b25492e49b71f099..c9f0c5a07e6e6c469d9131030a753d9116da9e73 100644 (file)
@@ -864,8 +864,8 @@ static int radeonfb_pan_display (struct fb_var_screeninfo *var,
 }
 
 
-static int radeonfb_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
-                           unsigned long arg, struct fb_info *info)
+static int radeonfb_ioctl (struct fb_info *info, unsigned int cmd,
+                           unsigned long arg)
 {
         struct radeonfb_info *rinfo = info->par;
        unsigned int tmp;
index 9248fe1fbb1a45e36e650058c566971f9aa232d3..641a6c1fbf2207a57aad27f7a06be4f40588a5f7 100644 (file)
@@ -36,8 +36,7 @@
 static int bw2_blank(int, struct fb_info *);
 
 static int bw2_mmap(struct fb_info *, struct file *, struct vm_area_struct *);
-static int bw2_ioctl(struct inode *, struct file *, unsigned int,
-                    unsigned long, struct fb_info *);
+static int bw2_ioctl(struct fb_info *, unsigned int, unsigned long);
 
 /*
  *  Frame buffer operations
@@ -181,8 +180,7 @@ static int bw2_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
                                  vma);
 }
 
-static int bw2_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-                    unsigned long arg, struct fb_info *info)
+static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
 {
        struct bw2_par *par = (struct bw2_par *) info->par;
 
index a56147102abbbaebcdac2ca6d80d530234ae756e..edb9936673c8424cc964713879557e3934aa9780 100644 (file)
@@ -32,8 +32,7 @@ static int cg14_setcolreg(unsigned, unsigned, unsigned, unsigned,
                         unsigned, struct fb_info *);
 
 static int cg14_mmap(struct fb_info *, struct file *, struct vm_area_struct *);
-static int cg14_ioctl(struct inode *, struct file *, unsigned int,
-                     unsigned long, struct fb_info *);
+static int cg14_ioctl(struct fb_info *, unsigned int, unsigned long);
 static int cg14_pan_display(struct fb_var_screeninfo *, struct fb_info *);
 
 /*
@@ -277,8 +276,7 @@ static int cg14_mmap(struct fb_info *info, struct file *file, struct vm_area_str
                                  par->iospace, vma);
 }
 
-static int cg14_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-                     unsigned long arg, struct fb_info *info)
+static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
 {
        struct cg14_par *par = (struct cg14_par *) info->par;
        struct cg14_regs __iomem *regs = par->regs;
index 9fcd89608ed7d6daa4ea4bd88ed4447b23845b59..027f707fa5dbe3bce76715057970cdb97a829d73 100644 (file)
@@ -34,8 +34,7 @@ static int cg3_setcolreg(unsigned, unsigned, unsigned, unsigned,
 static int cg3_blank(int, struct fb_info *);
 
 static int cg3_mmap(struct fb_info *, struct file *, struct vm_area_struct *);
-static int cg3_ioctl(struct inode *, struct file *, unsigned int,
-                    unsigned long, struct fb_info *);
+static int cg3_ioctl(struct fb_info *, unsigned int, unsigned long);
 
 /*
  *  Frame buffer operations
@@ -240,8 +239,7 @@ static int cg3_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
                                  vma);
 }
 
-static int cg3_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-                    unsigned long arg, struct fb_info *info)
+static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
 {
        struct cg3_par *par = (struct cg3_par *) info->par;
 
index 050835e39aa3569769e25e00bc18cfdeb2161b5a..678e335d2b0f8bb0b525e691ba7d90de22e47d4e 100644 (file)
@@ -37,8 +37,7 @@ static void cg6_imageblit(struct fb_info *, const struct fb_image *);
 static void cg6_fillrect(struct fb_info *, const struct fb_fillrect *);
 static int cg6_sync(struct fb_info *);
 static int cg6_mmap(struct fb_info *, struct file *, struct vm_area_struct *);
-static int cg6_ioctl(struct inode *, struct file *, unsigned int,
-                    unsigned long, struct fb_info *);
+static int cg6_ioctl(struct fb_info *, unsigned int, unsigned long);
 
 /*
  *  Frame buffer operations
@@ -534,8 +533,7 @@ static int cg6_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
                                  vma);
 }
 
-static int cg6_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-                    unsigned long arg, struct fb_info *info)
+static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
 {
        struct cg6_par *par = (struct cg6_par *) info->par;
 
index 32a9b69becc51d32764b6a75cbdfdad471dc5af7..80c16fb61e1c9f4a9b197c2a3c2fbb9dc058fb49 100644 (file)
@@ -957,7 +957,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
        default:
                if (fb->fb_ioctl == NULL)
                        return -EINVAL;
-               return fb->fb_ioctl(inode, file, cmd, arg, info);
+               return fb->fb_ioctl(info, cmd, arg);
        }
 }
 
@@ -1107,7 +1107,7 @@ fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
        default:
                if (fb->fb_compat_ioctl)
-                       ret = fb->fb_compat_ioctl(file, cmd, arg, info);
+                       ret = fb->fb_compat_ioctl(info, cmd, arg);
                break;
        }
        unlock_kernel();
index c4870d559afc47d7a644d081ef548ef64717685c..d096c129d20b46323d1f7618db53efc4284e4e89 100644 (file)
@@ -38,8 +38,7 @@ static void ffb_fillrect(struct fb_info *, const struct fb_fillrect *);
 static void ffb_copyarea(struct fb_info *, const struct fb_copyarea *);
 static int ffb_sync(struct fb_info *);
 static int ffb_mmap(struct fb_info *, struct file *, struct vm_area_struct *);
-static int ffb_ioctl(struct inode *, struct file *, unsigned int,
-                    unsigned long, struct fb_info *);
+static int ffb_ioctl(struct fb_info *, unsigned int, unsigned long);
 static int ffb_pan_display(struct fb_var_screeninfo *, struct fb_info *);
 
 /*
@@ -848,8 +847,7 @@ static int ffb_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
                                  0, vma);
 }
 
-static int ffb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-                    unsigned long arg, struct fb_info *info)
+static int ffb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
 {
        struct ffb_par *par = (struct ffb_par *) info->par;
 
index a5d813050db574ed36548ee82d848fcf46fd03de..ad416ae475963650a782e8c33b7f0e82a79cc298 100644 (file)
@@ -1267,8 +1267,7 @@ imsttfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
 #define FBIMSTT_GETIDXREG      0x545406
 
 static int
-imsttfb_ioctl(struct inode *inode, struct file *file, u_int cmd,
-             u_long arg, struct fb_info *info)
+imsttfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
 {
        struct imstt_par *par = info->par;
        void __user *argp = (void __user *)arg;
index 0090544842f5d672225b127c9f69f53ec31ebe63..6b8bd3cdf9c08f38fb9269c8da75a24b7267eb43 100644 (file)
@@ -157,9 +157,8 @@ static int intelfb_cursor(struct fb_info *info,
 
 static int intelfb_sync(struct fb_info *info);
 
-static int intelfb_ioctl(struct inode *inode, struct file *file,
-                        unsigned int cmd, unsigned long arg,
-                        struct fb_info *info);
+static int intelfb_ioctl(struct fb_info *info,
+                        unsigned int cmd, unsigned long arg);
 
 static int __devinit intelfb_pci_register(struct pci_dev *pdev,
                                          const struct pci_device_id *ent);
@@ -1380,8 +1379,7 @@ intelfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
 
 /* When/if we have our own ioctls. */
 static int
-intelfb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-             unsigned long arg, struct fb_info *info)
+intelfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
 {
        int retval = 0;
 
index bcd359b6d4ff5a86dd31b48e1d9008c4e0f254bc..477ad297de4e03f7a9096c745ef2f885d878dde2 100644 (file)
@@ -586,9 +586,8 @@ static int __init kyrofb_setup(char *options)
 }
 #endif
 
-static int kyrofb_ioctl(struct inode *inode, struct file *file,
-                       unsigned int cmd, unsigned long arg,
-                       struct fb_info *info)
+static int kyrofb_ioctl(struct fb_info *info,
+                       unsigned int cmd, unsigned long arg)
 {
        overlay_create ol_create;
        overlay_viewport_set ol_viewport_set;
index 494287f8f8bf5d3b3aced8b755f8e5def8598456..fb14787e13b9d2d7052c00825ad19cf29b775bce 100644 (file)
@@ -33,8 +33,7 @@ static int leo_setcolreg(unsigned, unsigned, unsigned, unsigned,
 static int leo_blank(int, struct fb_info *);
 
 static int leo_mmap(struct fb_info *, struct file *, struct vm_area_struct *);
-static int leo_ioctl(struct inode *, struct file *, unsigned int,
-                    unsigned long, struct fb_info *);
+static int leo_ioctl(struct fb_info *, unsigned int, unsigned long);
 static int leo_pan_display(struct fb_var_screeninfo *, struct fb_info *);
 
 /*
@@ -373,8 +372,7 @@ static int leo_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
                                  vma);
 }
 
-static int leo_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-                    unsigned long arg, struct fb_info *info)
+static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
 {
        struct leo_par *par = (struct leo_par *) info->par;
 
index 1e74f4cca53b2955d02cef90f29eaf5b4df10227..4055ff6f5a81c78d8fa53f9eda743983c7d176be 100644 (file)
@@ -865,9 +865,8 @@ static struct matrox_altout panellink_output = {
        .name    = "Panellink output",
 };
 
-static int matroxfb_ioctl(struct inode *inode, struct file *file,
-                         unsigned int cmd, unsigned long arg,
-                         struct fb_info *info)
+static int matroxfb_ioctl(struct fb_info *info,
+                         unsigned int cmd, unsigned long arg)
 {
        void __user *argp = (void __user *)arg;
        MINFO_FROM_INFO(info);
index d52d7d825c41439ccb7825b0ea9be41d363ae303..27eb4bb4f89fe2000aa2dbeda19a3c1a40a3387c 100644 (file)
@@ -419,11 +419,10 @@ static int matroxfb_dh_get_vblank(const struct matroxfb_dh_fb_info* m2info, stru
        return 0;
 }
 
-static int matroxfb_dh_ioctl(struct inode* inode,
-               struct file* file,
+static int matroxfb_dh_ioctl(struct fb_info *info,
                unsigned int cmd,
-               unsigned long arg,
-               struct fb_info* info) {
+               unsigned long arg)
+{
 #define m2info (container_of(info, struct matroxfb_dh_fb_info, fbcon))
        MINFO_FROM(m2info->primary_dev);
 
@@ -457,7 +456,7 @@ static int matroxfb_dh_ioctl(struct inode* inode,
                case MATROXFB_GET_OUTPUT_MODE:
                case MATROXFB_GET_ALL_OUTPUTS:
                        {
-                               return ACCESS_FBINFO(fbcon.fbops)->fb_ioctl(inode, file, cmd, arg, &ACCESS_FBINFO(fbcon));
+                               return ACCESS_FBINFO(fbcon.fbops)->fb_ioctl(&ACCESS_FBINFO(fbcon), cmd, arg);
                        }
                case MATROXFB_SET_OUTPUT_CONNECTION:
                        {
index b251e754e16cff62afdc08b4c96883df031060a6..a1025e9606f1424d70a7e4a562aa7f8c1bc26369 100644 (file)
@@ -32,8 +32,7 @@ static int p9100_setcolreg(unsigned, unsigned, unsigned, unsigned,
 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_ioctl(struct fb_info *, unsigned int, unsigned long);
 
 /*
  *  Frame buffer operations
@@ -232,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;
 
index 2e11b601c488cb63f4e0d815f258d03cda74bf12..0e78ddc81583dfe3a42b1ef2158346ed39699de5 100644 (file)
@@ -657,9 +657,7 @@ static void pm3fb_set_disp(const void *par, struct display *disp,
 static void pm3fb_detect(void);
 static int pm3fb_pan_display(const struct fb_var_screeninfo *var,
                             struct fb_info_gen *info);
-static int pm3fb_ioctl(struct inode *inode, struct file *file,
-                       u_int cmd, u_long arg, int con,
-                      struct fb_info *info);
+static int pm3fb_ioctl(struct fb_info *info, u_int cmd, u_long arg);
 
 
 /* the struct that hold them together */
@@ -3438,9 +3436,7 @@ static int pm3fb_pan_display(const struct fb_var_screeninfo *var,
        return 0;
 }
 
-static int pm3fb_ioctl(struct inode *inode, struct file *file,
-                       u_int cmd, u_long arg, int con,
-                      struct fb_info *info)
+static int pm3fb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
 {
        struct pm3fb_info *l_fb_info = (struct pm3fb_info *) info;
        u32 cm, i;
index 28d1fe5fe34007fcdf9996cb0216154732e74f1e..d92f352211efcdce0340ba94907b60d51d995d3d 100644 (file)
@@ -299,8 +299,7 @@ static int aafb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
                return -EINVAL;
 }
 
-static int aafb_ioctl(struct inode *inode, struct file *file, u32 cmd,
-                     unsigned long arg, int con, struct fb_info *info)
+static int aafb_ioctl(struct fb_info *info, u32 cmd, unsigned long arg)
 {
        /* TODO: Not yet implemented */
        return -ENOIOCTLCMD;
index 600318f708f294e2aafd4e2c04aa9767778735b8..db9fb9074dbcbfdb21846a55b2e1add84c9e4bbb 100644 (file)
@@ -1497,8 +1497,8 @@ static int radeonfb_pan_display (struct fb_var_screeninfo *var,
 }
 
 
-static int radeonfb_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
-                           unsigned long arg, struct fb_info *info)
+static int radeonfb_ioctl (struct fb_info *info, unsigned int cmd,
+                           unsigned long arg)
 {
         struct radeonfb_info *rinfo = (struct radeonfb_info *) info;
        unsigned int tmp;
index dea1a46c67c4fe232e24874fd08f15f46e7702b3..8adf5bf91eee075716b12d95d5eb26ef6c0312bc 100644 (file)
@@ -1743,13 +1743,14 @@ sisfb_blank(int blank, struct fb_info *info)
 
 /* ----------- FBDev related routines for all series ---------- */
 
-static int
-sisfb_ioctl(struct inode *inode, struct file *file,
-            unsigned int cmd, unsigned long arg,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-           int con,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+static int     sisfb_ioctl(struct fb_info *info, unsigned int cmd,
+                           unsigned long arg)
+#else
+static int     sisfb_ioctl(struct inode *inode, struct file *file,
+                               unsigned int cmd, unsigned long arg,
+                               struct fb_info *info)
 #endif
-           struct fb_info *info)
 {
        struct sis_video_info   *ivideo = (struct sis_video_info *)info->par;
        struct sis_memreq       sismemreq;
@@ -1924,19 +1925,6 @@ sisfb_ioctl(struct inode *inode, struct file *file,
        return 0;
 }
 
-#ifdef SIS_NEW_CONFIG_COMPAT
-static long
-sisfb_compat_ioctl(struct file *f, unsigned int cmd, unsigned long arg, struct fb_info *info)
-{
-       int ret;
-
-       lock_kernel();
-       ret = sisfb_ioctl(NULL, f, cmd, arg, info);
-       unlock_kernel();
-       return ret;
-}
-#endif
-
 static int
 sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info)
 {
@@ -2007,7 +1995,7 @@ static struct fb_ops sisfb_ops = {
 #endif
        .fb_sync        = fbcon_sis_sync,
 #ifdef SIS_NEW_CONFIG_COMPAT
-       .fb_compat_ioctl= sisfb_compat_ioctl,
+       .fb_compat_ioctl= sisfb_ioctl,
 #endif
        .fb_ioctl       = sisfb_ioctl
 };
index 445bcbba03aefd54e336c5c1f436bf4d858bfe75..70b6df371b8e7f72231c91c9bbc32efb9c1fdb28 100644 (file)
@@ -727,9 +727,14 @@ static int sisfb_ioctl(struct inode *inode, struct file *file,
 #endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+static int     sisfb_ioctl(struct fb_info *info, unsigned int cmd,
+                           unsigned long arg);
+#else
 static int     sisfb_ioctl(struct inode *inode, struct file *file,
                                unsigned int cmd, unsigned long arg,
                                struct fb_info *info);
+#endif
 static int     sisfb_set_par(struct fb_info *info);
 static int     sisfb_blank(int blank,
                                struct fb_info *info);
index 8a5ce210bb27c6b6876dc83bf1b250819f49f32b..99921df35474d079dd696b4f1ebd98fe98efb458 100644 (file)
@@ -771,8 +771,7 @@ static int sstfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
        return 0;
 }
 
-static int sstfb_ioctl(struct inode *inode, struct file *file,
-                       u_int cmd, u_long arg, struct fb_info *info )
+static int sstfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
 {
        struct sstfb_par *par = info->par;
        struct pci_dev *sst_dev = par->dev;
index 2b27b4474001d66020a28fadc2b42080b82d620b..cb940771ec5890d8ee26ea777f065d09d2b82dbd 100644 (file)
@@ -34,8 +34,7 @@ static int tcx_setcolreg(unsigned, unsigned, unsigned, unsigned,
 static int tcx_blank(int, struct fb_info *);
 
 static int tcx_mmap(struct fb_info *, struct file *, struct vm_area_struct *);
-static int tcx_ioctl(struct inode *, struct file *, unsigned int,
-                    unsigned long, struct fb_info *);
+static int tcx_ioctl(struct fb_info *, unsigned int, unsigned long);
 static int tcx_pan_display(struct fb_var_screeninfo *, struct fb_info *);
 
 /*
@@ -312,8 +311,8 @@ static int tcx_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
                                  vma);
 }
 
-static int tcx_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-                    unsigned long arg, struct fb_info *info)
+static int tcx_ioctl(struct fb_info *info, unsigned int cmd,
+                    unsigned long arg)
 {
        struct tcx_par *par = (struct tcx_par *) info->par;
 
index a973be2cfe61abb2fb774bc5409225556649c2d1..6da8a80a2662796ca425d3a6290da46990c24c13 100644 (file)
@@ -608,12 +608,12 @@ struct fb_ops {
        int (*fb_sync)(struct fb_info *info);
 
        /* perform fb specific ioctl (optional) */
-       int (*fb_ioctl)(struct inode *inode, struct file *file, unsigned int cmd,
-                       unsigned long arg, struct fb_info *info);
+       int (*fb_ioctl)(struct fb_info *info, unsigned int cmd,
+                       unsigned long arg);
 
        /* Handle 32bit compat ioctl (optional) */
-       long (*fb_compat_ioctl)(struct file *f, unsigned cmd, unsigned long arg,
-                              struct fb_info *info);
+       int (*fb_compat_ioctl)(struct fb_info *info, unsigned cmd,
+                       unsigned long arg);
 
        /* perform fb specific mmap */
        int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);