aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/68328fb.c6
-rw-r--r--drivers/video/acornfb.c2
-rw-r--r--drivers/video/amba-clcd.c2
-rw-r--r--drivers/video/amifb.c9
-rw-r--r--drivers/video/arcfb.c5
-rw-r--r--drivers/video/atafb.c3
-rw-r--r--drivers/video/aty/aty128fb.c6
-rw-r--r--drivers/video/aty/atyfb_base.c10
-rw-r--r--drivers/video/aty/radeon_base.c4
-rw-r--r--drivers/video/aty/radeon_pm.c6
-rw-r--r--drivers/video/au1100fb.c2
-rw-r--r--drivers/video/bw2.c10
-rw-r--r--drivers/video/cg14.c10
-rw-r--r--drivers/video/cg3.c10
-rw-r--r--drivers/video/cg6.c10
-rw-r--r--drivers/video/controlfb.c4
-rw-r--r--drivers/video/fbmem.c6
-rw-r--r--drivers/video/ffb.c10
-rw-r--r--drivers/video/gbefb.c3
-rw-r--r--drivers/video/geode/gx1fb_core.c11
-rw-r--r--drivers/video/igafb.c2
-rw-r--r--drivers/video/imsttfb.c3
-rw-r--r--drivers/video/intelfb/intelfbdrv.c8
-rw-r--r--drivers/video/kyro/fbdev.c5
-rw-r--r--drivers/video/leo.c10
-rw-r--r--drivers/video/matrox/matroxfb_base.c5
-rw-r--r--drivers/video/matrox/matroxfb_crtc2.c9
-rw-r--r--drivers/video/matrox/matroxfb_maven.c2
-rw-r--r--drivers/video/neofb.c2
-rw-r--r--drivers/video/p9100.c11
-rw-r--r--drivers/video/pm3fb.c8
-rw-r--r--drivers/video/pmag-aa-fb.c3
-rw-r--r--drivers/video/pxafb.c2
-rw-r--r--drivers/video/radeonfb.c4
-rw-r--r--drivers/video/sa1100fb.c2
-rw-r--r--drivers/video/sbuslib.c25
-rw-r--r--drivers/video/sbuslib.h4
-rw-r--r--drivers/video/sgivwfb.c5
-rw-r--r--drivers/video/sis/sis_main.c28
-rw-r--r--drivers/video/sis/sis_main.h5
-rw-r--r--drivers/video/sstfb.c3
-rw-r--r--drivers/video/tcx.c11
-rw-r--r--drivers/video/vfb.c4
43 files changed, 118 insertions, 172 deletions
diff --git a/drivers/video/68328fb.c b/drivers/video/68328fb.c
index 3b0ddc55236b..78488bb41aeb 100644
--- a/drivers/video/68328fb.c
+++ b/drivers/video/68328fb.c
@@ -102,8 +102,7 @@ static int mc68x328fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
102 u_int transp, struct fb_info *info); 102 u_int transp, struct fb_info *info);
103static int mc68x328fb_pan_display(struct fb_var_screeninfo *var, 103static int mc68x328fb_pan_display(struct fb_var_screeninfo *var,
104 struct fb_info *info); 104 struct fb_info *info);
105static int mc68x328fb_mmap(struct fb_info *info, struct file *file, 105static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma);
106 struct vm_area_struct *vma);
107 106
108static struct fb_ops mc68x328fb_ops = { 107static struct fb_ops mc68x328fb_ops = {
109 .fb_check_var = mc68x328fb_check_var, 108 .fb_check_var = mc68x328fb_check_var,
@@ -398,8 +397,7 @@ static int mc68x328fb_pan_display(struct fb_var_screeninfo *var,
398 * Most drivers don't need their own mmap function 397 * Most drivers don't need their own mmap function
399 */ 398 */
400 399
401static int mc68x328fb_mmap(struct fb_info *info, struct file *file, 400static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
402 struct vm_area_struct *vma)
403{ 401{
404#ifndef MMU 402#ifndef MMU
405 /* this is uClinux (no MMU) specific code */ 403 /* this is uClinux (no MMU) specific code */
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
index 750cebb18306..b058273527bb 100644
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -883,7 +883,7 @@ acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
883 * Note that we are entered with the kernel locked. 883 * Note that we are entered with the kernel locked.
884 */ 884 */
885static int 885static int
886acornfb_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 886acornfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
887{ 887{
888 unsigned long off, start; 888 unsigned long off, start;
889 u32 len; 889 u32 len;
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
index 0da4083ba908..b2187175d03f 100644
--- a/drivers/video/amba-clcd.c
+++ b/drivers/video/amba-clcd.c
@@ -307,7 +307,7 @@ static int clcdfb_blank(int blank_mode, struct fb_info *info)
307 return 0; 307 return 0;
308} 308}
309 309
310static int clcdfb_mmap(struct fb_info *info, struct file *file, 310static int clcdfb_mmap(struct fb_info *info,
311 struct vm_area_struct *vma) 311 struct vm_area_struct *vma)
312{ 312{
313 struct clcd_fb *fb = to_clcd(info); 313 struct clcd_fb *fb = to_clcd(info);
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c
index 2c42a812655a..3033c72dea20 100644
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -1131,9 +1131,7 @@ static void amifb_copyarea(struct fb_info *info,
1131 const struct fb_copyarea *region); 1131 const struct fb_copyarea *region);
1132static void amifb_imageblit(struct fb_info *info, 1132static void amifb_imageblit(struct fb_info *info,
1133 const struct fb_image *image); 1133 const struct fb_image *image);
1134static int amifb_ioctl(struct inode *inode, struct file *file, 1134static int amifb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
1135 unsigned int cmd, unsigned long arg,
1136 struct fb_info *info);
1137 1135
1138 1136
1139 /* 1137 /*
@@ -2172,9 +2170,8 @@ static void amifb_imageblit(struct fb_info *info, const struct fb_image *image)
2172 * Amiga Frame Buffer Specific ioctls 2170 * Amiga Frame Buffer Specific ioctls
2173 */ 2171 */
2174 2172
2175static int amifb_ioctl(struct inode *inode, struct file *file, 2173static int amifb_ioctl(struct fb_info *info,
2176 unsigned int cmd, unsigned long arg, 2174 unsigned int cmd, unsigned long arg)
2177 struct fb_info *info)
2178{ 2175{
2179 union { 2176 union {
2180 struct fb_fix_cursorinfo fix; 2177 struct fb_fix_cursorinfo fix;
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index 89060b2db8e5..df8e5667b348 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -399,9 +399,8 @@ static void arcfb_imageblit(struct fb_info *info, const struct fb_image *image)
399 image->height); 399 image->height);
400} 400}
401 401
402static int arcfb_ioctl(struct inode *inode, struct file *file, 402static int arcfb_ioctl(struct fb_info *info,
403 unsigned int cmd, unsigned long arg, 403 unsigned int cmd, unsigned long arg)
404 struct fb_info *info)
405{ 404{
406 void __user *argp = (void __user *)arg; 405 void __user *argp = (void __user *)arg;
407 struct arcfb_par *par = info->par; 406 struct arcfb_par *par = info->par;
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c
index 15ec1295bc29..e69ab65f7843 100644
--- a/drivers/video/atafb.c
+++ b/drivers/video/atafb.c
@@ -2571,8 +2571,7 @@ atafb_pan_display(struct fb_var_screeninfo *var, int con, struct fb_info *info)
2571} 2571}
2572 2572
2573static int 2573static int
2574atafb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 2574atafb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
2575 unsigned long arg, int con, struct fb_info *info)
2576{ 2575{
2577 switch (cmd) { 2576 switch (cmd) {
2578#ifdef FBCMD_GET_CURRENTPAR 2577#ifdef FBCMD_GET_CURRENTPAR
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index e686185a076d..bfc8a93b2c73 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -431,8 +431,7 @@ static int aty128fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
431static int aty128fb_pan_display(struct fb_var_screeninfo *var, 431static int aty128fb_pan_display(struct fb_var_screeninfo *var,
432 struct fb_info *fb); 432 struct fb_info *fb);
433static int aty128fb_blank(int blank, struct fb_info *fb); 433static int aty128fb_blank(int blank, struct fb_info *fb);
434static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd, 434static int aty128fb_ioctl(struct fb_info *info, u_int cmd, unsigned long arg);
435 u_long arg, struct fb_info *info);
436static int aty128fb_sync(struct fb_info *info); 435static int aty128fb_sync(struct fb_info *info);
437 436
438 /* 437 /*
@@ -2108,8 +2107,7 @@ static int aty128fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
2108/* in param: u32* backlight value: 0 to 15 */ 2107/* in param: u32* backlight value: 0 to 15 */
2109#define FBIO_ATY128_SET_MIRROR _IOW('@', 2, __u32) 2108#define FBIO_ATY128_SET_MIRROR _IOW('@', 2, __u32)
2110 2109
2111static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd, 2110static int aty128fb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
2112 u_long arg, struct fb_info *info)
2113{ 2111{
2114 struct aty128fb_par *par = info->par; 2112 struct aty128fb_par *par = info->par;
2115 u32 value; 2113 u32 value;
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index ed81005cbdba..485be386a8ff 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -238,13 +238,12 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
238 u_int transp, struct fb_info *info); 238 u_int transp, struct fb_info *info);
239static int atyfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); 239static int atyfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info);
240static int atyfb_blank(int blank, struct fb_info *info); 240static int atyfb_blank(int blank, struct fb_info *info);
241static int atyfb_ioctl(struct inode *inode, struct file *file, u_int cmd, 241static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg);
242 u_long arg, struct fb_info *info);
243extern void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); 242extern void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
244extern void atyfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); 243extern void atyfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);
245extern void atyfb_imageblit(struct fb_info *info, const struct fb_image *image); 244extern void atyfb_imageblit(struct fb_info *info, const struct fb_image *image);
246#ifdef __sparc__ 245#ifdef __sparc__
247static int atyfb_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma); 246static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
248#endif 247#endif
249static int atyfb_sync(struct fb_info *info); 248static int atyfb_sync(struct fb_info *info);
250 249
@@ -1739,8 +1738,7 @@ struct atyclk {
1739#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) 1738#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
1740#endif 1739#endif
1741 1740
1742static int atyfb_ioctl(struct inode *inode, struct file *file, u_int cmd, 1741static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
1743 u_long arg, struct fb_info *info)
1744{ 1742{
1745 struct atyfb_par *par = (struct atyfb_par *) info->par; 1743 struct atyfb_par *par = (struct atyfb_par *) info->par;
1746#ifdef __sparc__ 1744#ifdef __sparc__
@@ -1845,7 +1843,7 @@ static int atyfb_sync(struct fb_info *info)
1845} 1843}
1846 1844
1847#ifdef __sparc__ 1845#ifdef __sparc__
1848static int atyfb_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 1846static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
1849{ 1847{
1850 struct atyfb_par *par = (struct atyfb_par *) info->par; 1848 struct atyfb_par *par = (struct atyfb_par *) info->par;
1851 unsigned int size, page, map_size = 0; 1849 unsigned int size, page, map_size = 0;
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 156db84cb363..c9f0c5a07e6e 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -864,8 +864,8 @@ static int radeonfb_pan_display (struct fb_var_screeninfo *var,
864} 864}
865 865
866 866
867static int radeonfb_ioctl (struct inode *inode, struct file *file, unsigned int cmd, 867static int radeonfb_ioctl (struct fb_info *info, unsigned int cmd,
868 unsigned long arg, struct fb_info *info) 868 unsigned long arg)
869{ 869{
870 struct radeonfb_info *rinfo = info->par; 870 struct radeonfb_info *rinfo = info->par;
871 unsigned int tmp; 871 unsigned int tmp;
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c
index 097d668c4fe5..556895e99645 100644
--- a/drivers/video/aty/radeon_pm.c
+++ b/drivers/video/aty/radeon_pm.c
@@ -2734,7 +2734,7 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk)
2734 * BIOS does tho. Right now, all this PM stuff is pmac-only for that 2734 * BIOS does tho. Right now, all this PM stuff is pmac-only for that
2735 * reason. --BenH 2735 * reason. --BenH
2736 */ 2736 */
2737#if defined(CONFIG_PM) && defined(CONFIG_PPC_OF) 2737#if defined(CONFIG_PM) && defined(CONFIG_PPC_PMAC)
2738 if (_machine == _MACH_Pmac && rinfo->of_node) { 2738 if (_machine == _MACH_Pmac && rinfo->of_node) {
2739 if (rinfo->is_mobility && rinfo->pm_reg && 2739 if (rinfo->is_mobility && rinfo->pm_reg &&
2740 rinfo->family <= CHIP_FAMILY_RV250) 2740 rinfo->family <= CHIP_FAMILY_RV250)
@@ -2778,12 +2778,12 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk)
2778 OUTREG(TV_DAC_CNTL, INREG(TV_DAC_CNTL) | 0x07000000); 2778 OUTREG(TV_DAC_CNTL, INREG(TV_DAC_CNTL) | 0x07000000);
2779#endif 2779#endif
2780 } 2780 }
2781#endif /* defined(CONFIG_PM) && defined(CONFIG_PPC_OF) */ 2781#endif /* defined(CONFIG_PM) && defined(CONFIG_PPC_PMAC) */
2782} 2782}
2783 2783
2784void radeonfb_pm_exit(struct radeonfb_info *rinfo) 2784void radeonfb_pm_exit(struct radeonfb_info *rinfo)
2785{ 2785{
2786#if defined(CONFIG_PM) && defined(CONFIG_PPC_OF) 2786#if defined(CONFIG_PM) && defined(CONFIG_PPC_PMAC)
2787 if (rinfo->pm_mode != radeon_pm_none) 2787 if (rinfo->pm_mode != radeon_pm_none)
2788 pmac_set_early_video_resume(NULL, NULL); 2788 pmac_set_early_video_resume(NULL, NULL);
2789#endif 2789#endif
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c
index a5129806172f..2406899f1207 100644
--- a/drivers/video/au1100fb.c
+++ b/drivers/video/au1100fb.c
@@ -379,7 +379,7 @@ void au1100fb_fb_rotate(struct fb_info *fbi, int angle)
379 * Map video memory in user space. We don't use the generic fb_mmap method mainly 379 * Map video memory in user space. We don't use the generic fb_mmap method mainly
380 * to allow the use of the TLB streaming flag (CCA=6) 380 * to allow the use of the TLB streaming flag (CCA=6)
381 */ 381 */
382int au1100fb_fb_mmap(struct fb_info *fbi, struct file *file, struct vm_area_struct *vma) 382int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
383{ 383{
384 struct au1100fb_device *fbdev = to_au1100fb_device(fbi); 384 struct au1100fb_device *fbdev = to_au1100fb_device(fbi);
385 unsigned int len; 385 unsigned int len;
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c
index 9248fe1fbb1a..c029db4646f6 100644
--- a/drivers/video/bw2.c
+++ b/drivers/video/bw2.c
@@ -35,9 +35,8 @@
35 35
36static int bw2_blank(int, struct fb_info *); 36static int bw2_blank(int, struct fb_info *);
37 37
38static int bw2_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 38static int bw2_mmap(struct fb_info *, struct vm_area_struct *);
39static int bw2_ioctl(struct inode *, struct file *, unsigned int, 39static int bw2_ioctl(struct fb_info *, unsigned int, unsigned long);
40 unsigned long, struct fb_info *);
41 40
42/* 41/*
43 * Frame buffer operations 42 * Frame buffer operations
@@ -169,7 +168,7 @@ static struct sbus_mmap_map bw2_mmap_map[] = {
169 { .size = 0 } 168 { .size = 0 }
170}; 169};
171 170
172static int bw2_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 171static int bw2_mmap(struct fb_info *info, struct vm_area_struct *vma)
173{ 172{
174 struct bw2_par *par = (struct bw2_par *)info->par; 173 struct bw2_par *par = (struct bw2_par *)info->par;
175 174
@@ -181,8 +180,7 @@ static int bw2_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
181 vma); 180 vma);
182} 181}
183 182
184static int bw2_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 183static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
185 unsigned long arg, struct fb_info *info)
186{ 184{
187 struct bw2_par *par = (struct bw2_par *) info->par; 185 struct bw2_par *par = (struct bw2_par *) info->par;
188 186
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c
index a56147102abb..63b6c79c8a0a 100644
--- a/drivers/video/cg14.c
+++ b/drivers/video/cg14.c
@@ -31,9 +31,8 @@
31static int cg14_setcolreg(unsigned, unsigned, unsigned, unsigned, 31static int cg14_setcolreg(unsigned, unsigned, unsigned, unsigned,
32 unsigned, struct fb_info *); 32 unsigned, struct fb_info *);
33 33
34static int cg14_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 34static int cg14_mmap(struct fb_info *, struct vm_area_struct *);
35static int cg14_ioctl(struct inode *, struct file *, unsigned int, 35static int cg14_ioctl(struct fb_info *, unsigned int, unsigned long);
36 unsigned long, struct fb_info *);
37static int cg14_pan_display(struct fb_var_screeninfo *, struct fb_info *); 36static int cg14_pan_display(struct fb_var_screeninfo *, struct fb_info *);
38 37
39/* 38/*
@@ -268,7 +267,7 @@ static int cg14_setcolreg(unsigned regno,
268 return 0; 267 return 0;
269} 268}
270 269
271static int cg14_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 270static int cg14_mmap(struct fb_info *info, struct vm_area_struct *vma)
272{ 271{
273 struct cg14_par *par = (struct cg14_par *) info->par; 272 struct cg14_par *par = (struct cg14_par *) info->par;
274 273
@@ -277,8 +276,7 @@ static int cg14_mmap(struct fb_info *info, struct file *file, struct vm_area_str
277 par->iospace, vma); 276 par->iospace, vma);
278} 277}
279 278
280static int cg14_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 279static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
281 unsigned long arg, struct fb_info *info)
282{ 280{
283 struct cg14_par *par = (struct cg14_par *) info->par; 281 struct cg14_par *par = (struct cg14_par *) info->par;
284 struct cg14_regs __iomem *regs = par->regs; 282 struct cg14_regs __iomem *regs = par->regs;
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c
index 9fcd89608ed7..3de6e1b5ab2f 100644
--- a/drivers/video/cg3.c
+++ b/drivers/video/cg3.c
@@ -33,9 +33,8 @@ static int cg3_setcolreg(unsigned, unsigned, unsigned, unsigned,
33 unsigned, struct fb_info *); 33 unsigned, struct fb_info *);
34static int cg3_blank(int, struct fb_info *); 34static int cg3_blank(int, struct fb_info *);
35 35
36static int cg3_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 36static int cg3_mmap(struct fb_info *, struct vm_area_struct *);
37static int cg3_ioctl(struct inode *, struct file *, unsigned int, 37static int cg3_ioctl(struct fb_info *, unsigned int, unsigned long);
38 unsigned long, struct fb_info *);
39 38
40/* 39/*
41 * Frame buffer operations 40 * Frame buffer operations
@@ -230,7 +229,7 @@ static struct sbus_mmap_map cg3_mmap_map[] = {
230 { .size = 0 } 229 { .size = 0 }
231}; 230};
232 231
233static int cg3_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 232static int cg3_mmap(struct fb_info *info, struct vm_area_struct *vma)
234{ 233{
235 struct cg3_par *par = (struct cg3_par *)info->par; 234 struct cg3_par *par = (struct cg3_par *)info->par;
236 235
@@ -240,8 +239,7 @@ static int cg3_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
240 vma); 239 vma);
241} 240}
242 241
243static int cg3_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 242static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
244 unsigned long arg, struct fb_info *info)
245{ 243{
246 struct cg3_par *par = (struct cg3_par *) info->par; 244 struct cg3_par *par = (struct cg3_par *) info->par;
247 245
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 050835e39aa3..7aab91ead681 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -36,9 +36,8 @@ static int cg6_blank(int, struct fb_info *);
36static void cg6_imageblit(struct fb_info *, const struct fb_image *); 36static void cg6_imageblit(struct fb_info *, const struct fb_image *);
37static void cg6_fillrect(struct fb_info *, const struct fb_fillrect *); 37static void cg6_fillrect(struct fb_info *, const struct fb_fillrect *);
38static int cg6_sync(struct fb_info *); 38static int cg6_sync(struct fb_info *);
39static int cg6_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 39static int cg6_mmap(struct fb_info *, struct vm_area_struct *);
40static int cg6_ioctl(struct inode *, struct file *, unsigned int, 40static int cg6_ioctl(struct fb_info *, unsigned int, unsigned long);
41 unsigned long, struct fb_info *);
42 41
43/* 42/*
44 * Frame buffer operations 43 * Frame buffer operations
@@ -524,7 +523,7 @@ static struct sbus_mmap_map cg6_mmap_map[] = {
524 { .size = 0 } 523 { .size = 0 }
525}; 524};
526 525
527static int cg6_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 526static int cg6_mmap(struct fb_info *info, struct vm_area_struct *vma)
528{ 527{
529 struct cg6_par *par = (struct cg6_par *)info->par; 528 struct cg6_par *par = (struct cg6_par *)info->par;
530 529
@@ -534,8 +533,7 @@ static int cg6_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
534 vma); 533 vma);
535} 534}
536 535
537static int cg6_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 536static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
538 unsigned long arg, struct fb_info *info)
539{ 537{
540 struct cg6_par *par = (struct cg6_par *) info->par; 538 struct cg6_par *par = (struct cg6_par *) info->par;
541 539
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
index 03798e9c882d..655301a8671c 100644
--- a/drivers/video/controlfb.c
+++ b/drivers/video/controlfb.c
@@ -128,7 +128,7 @@ static int controlfb_pan_display(struct fb_var_screeninfo *var,
128static int controlfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, 128static int controlfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
129 u_int transp, struct fb_info *info); 129 u_int transp, struct fb_info *info);
130static int controlfb_blank(int blank_mode, struct fb_info *info); 130static int controlfb_blank(int blank_mode, struct fb_info *info);
131static int controlfb_mmap(struct fb_info *info, struct file *file, 131static int controlfb_mmap(struct fb_info *info,
132 struct vm_area_struct *vma); 132 struct vm_area_struct *vma);
133static int controlfb_set_par (struct fb_info *info); 133static int controlfb_set_par (struct fb_info *info);
134static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *info); 134static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *info);
@@ -280,7 +280,7 @@ static int controlfb_pan_display(struct fb_var_screeninfo *var,
280 * for controlfb. 280 * for controlfb.
281 * Note there's no locking in here; it's done in fb_mmap() in fbmem.c. 281 * Note there's no locking in here; it's done in fb_mmap() in fbmem.c.
282 */ 282 */
283static int controlfb_mmap(struct fb_info *info, struct file *file, 283static int controlfb_mmap(struct fb_info *info,
284 struct vm_area_struct *vma) 284 struct vm_area_struct *vma)
285{ 285{
286 unsigned long off, start; 286 unsigned long off, start;
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 32a9b69becc5..d2dede6ed3e5 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -957,7 +957,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
957 default: 957 default:
958 if (fb->fb_ioctl == NULL) 958 if (fb->fb_ioctl == NULL)
959 return -EINVAL; 959 return -EINVAL;
960 return fb->fb_ioctl(inode, file, cmd, arg, info); 960 return fb->fb_ioctl(info, cmd, arg);
961 } 961 }
962} 962}
963 963
@@ -1107,7 +1107,7 @@ fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1107 1107
1108 default: 1108 default:
1109 if (fb->fb_compat_ioctl) 1109 if (fb->fb_compat_ioctl)
1110 ret = fb->fb_compat_ioctl(file, cmd, arg, info); 1110 ret = fb->fb_compat_ioctl(info, cmd, arg);
1111 break; 1111 break;
1112 } 1112 }
1113 unlock_kernel(); 1113 unlock_kernel();
@@ -1135,7 +1135,7 @@ fb_mmap(struct file *file, struct vm_area_struct * vma)
1135 if (fb->fb_mmap) { 1135 if (fb->fb_mmap) {
1136 int res; 1136 int res;
1137 lock_kernel(); 1137 lock_kernel();
1138 res = fb->fb_mmap(info, file, vma); 1138 res = fb->fb_mmap(info, vma);
1139 unlock_kernel(); 1139 unlock_kernel();
1140 return res; 1140 return res;
1141 } 1141 }
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index c4870d559afc..9c9b21d469a1 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -37,9 +37,8 @@ static void ffb_imageblit(struct fb_info *, const struct fb_image *);
37static void ffb_fillrect(struct fb_info *, const struct fb_fillrect *); 37static void ffb_fillrect(struct fb_info *, const struct fb_fillrect *);
38static void ffb_copyarea(struct fb_info *, const struct fb_copyarea *); 38static void ffb_copyarea(struct fb_info *, const struct fb_copyarea *);
39static int ffb_sync(struct fb_info *); 39static int ffb_sync(struct fb_info *);
40static int ffb_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 40static int ffb_mmap(struct fb_info *, struct vm_area_struct *);
41static int ffb_ioctl(struct inode *, struct file *, unsigned int, 41static int ffb_ioctl(struct fb_info *, unsigned int, unsigned long);
42 unsigned long, struct fb_info *);
43static int ffb_pan_display(struct fb_var_screeninfo *, struct fb_info *); 42static int ffb_pan_display(struct fb_var_screeninfo *, struct fb_info *);
44 43
45/* 44/*
@@ -839,7 +838,7 @@ static struct sbus_mmap_map ffb_mmap_map[] = {
839 { .size = 0 } 838 { .size = 0 }
840}; 839};
841 840
842static int ffb_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 841static int ffb_mmap(struct fb_info *info, struct vm_area_struct *vma)
843{ 842{
844 struct ffb_par *par = (struct ffb_par *)info->par; 843 struct ffb_par *par = (struct ffb_par *)info->par;
845 844
@@ -848,8 +847,7 @@ static int ffb_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
848 0, vma); 847 0, vma);
849} 848}
850 849
851static int ffb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 850static int ffb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
852 unsigned long arg, struct fb_info *info)
853{ 851{
854 struct ffb_par *par = (struct ffb_par *) info->par; 852 struct ffb_par *par = (struct ffb_par *) info->par;
855 853
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
index d744c51807b7..38d22729b129 100644
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -979,7 +979,7 @@ static int gbefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
979 return 0; 979 return 0;
980} 980}
981 981
982static int gbefb_mmap(struct fb_info *info, struct file *file, 982static int gbefb_mmap(struct fb_info *info,
983 struct vm_area_struct *vma) 983 struct vm_area_struct *vma)
984{ 984{
985 unsigned long size = vma->vm_end - vma->vm_start; 985 unsigned long size = vma->vm_end - vma->vm_start;
@@ -1000,7 +1000,6 @@ static int gbefb_mmap(struct fb_info *info, struct file *file,
1000 pgprot_fb(pgprot_val(vma->vm_page_prot)); 1000 pgprot_fb(pgprot_val(vma->vm_page_prot));
1001 1001
1002 vma->vm_flags |= VM_IO | VM_RESERVED; 1002 vma->vm_flags |= VM_IO | VM_RESERVED;
1003 vma->vm_file = file;
1004 1003
1005 /* look for the starting tile */ 1004 /* look for the starting tile */
1006 tile = &gbe_tiles.cpu[offset >> TILE_SHIFT]; 1005 tile = &gbe_tiles.cpu[offset >> TILE_SHIFT];
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c
index 8e8da7433994..20e69156d728 100644
--- a/drivers/video/geode/gx1fb_core.c
+++ b/drivers/video/geode/gx1fb_core.c
@@ -215,11 +215,11 @@ static int __init gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *d
215 if (ret < 0) 215 if (ret < 0)
216 return ret; 216 return ret;
217 217
218 ret = pci_request_region(dev, 1, "gx1fb (video)"); 218 ret = pci_request_region(dev, 0, "gx1fb (video)");
219 if (ret < 0) 219 if (ret < 0)
220 return ret; 220 return ret;
221 par->vid_regs = ioremap(pci_resource_start(dev, 1), 221 par->vid_regs = ioremap(pci_resource_start(dev, 0),
222 pci_resource_len(dev, 1)); 222 pci_resource_len(dev, 0));
223 if (!par->vid_regs) 223 if (!par->vid_regs)
224 return -ENOMEM; 224 return -ENOMEM;
225 225
@@ -229,12 +229,9 @@ static int __init gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *d
229 if (!par->dc_regs) 229 if (!par->dc_regs)
230 return -ENOMEM; 230 return -ENOMEM;
231 231
232 ret = pci_request_region(dev, 0, "gx1fb (frame buffer)");
233 if (ret < 0 )
234 return -EBUSY;
235 if ((fb_len = gx1_frame_buffer_size()) < 0) 232 if ((fb_len = gx1_frame_buffer_size()) < 0)
236 return -ENOMEM; 233 return -ENOMEM;
237 info->fix.smem_start = pci_resource_start(dev, 0); 234 info->fix.smem_start = gx_base + 0x800000;
238 info->fix.smem_len = fb_len; 235 info->fix.smem_len = fb_len;
239 info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); 236 info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len);
240 if (!info->screen_base) 237 if (!info->screen_base)
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
index e326f44f652d..6b88050d21bf 100644
--- a/drivers/video/igafb.c
+++ b/drivers/video/igafb.c
@@ -219,7 +219,7 @@ static void iga_blank_border(struct iga_par *par)
219} 219}
220 220
221#ifdef __sparc__ 221#ifdef __sparc__
222static int igafb_mmap(struct fb_info *info, struct file *file, 222static int igafb_mmap(struct fb_info *info,
223 struct vm_area_struct *vma) 223 struct vm_area_struct *vma)
224{ 224{
225 struct iga_par *par = (struct iga_par *)info->par; 225 struct iga_par *par = (struct iga_par *)info->par;
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
index a5d813050db5..ad416ae47596 100644
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -1267,8 +1267,7 @@ imsttfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1267#define FBIMSTT_GETIDXREG 0x545406 1267#define FBIMSTT_GETIDXREG 0x545406
1268 1268
1269static int 1269static int
1270imsttfb_ioctl(struct inode *inode, struct file *file, u_int cmd, 1270imsttfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
1271 u_long arg, struct fb_info *info)
1272{ 1271{
1273 struct imstt_par *par = info->par; 1272 struct imstt_par *par = info->par;
1274 void __user *argp = (void __user *)arg; 1273 void __user *argp = (void __user *)arg;
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 0090544842f5..6b8bd3cdf9c0 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -157,9 +157,8 @@ static int intelfb_cursor(struct fb_info *info,
157 157
158static int intelfb_sync(struct fb_info *info); 158static int intelfb_sync(struct fb_info *info);
159 159
160static int intelfb_ioctl(struct inode *inode, struct file *file, 160static int intelfb_ioctl(struct fb_info *info,
161 unsigned int cmd, unsigned long arg, 161 unsigned int cmd, unsigned long arg);
162 struct fb_info *info);
163 162
164static int __devinit intelfb_pci_register(struct pci_dev *pdev, 163static int __devinit intelfb_pci_register(struct pci_dev *pdev,
165 const struct pci_device_id *ent); 164 const struct pci_device_id *ent);
@@ -1380,8 +1379,7 @@ intelfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
1380 1379
1381/* When/if we have our own ioctls. */ 1380/* When/if we have our own ioctls. */
1382static int 1381static int
1383intelfb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 1382intelfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
1384 unsigned long arg, struct fb_info *info)
1385{ 1383{
1386 int retval = 0; 1384 int retval = 0;
1387 1385
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
index bcd359b6d4ff..477ad297de4e 100644
--- a/drivers/video/kyro/fbdev.c
+++ b/drivers/video/kyro/fbdev.c
@@ -586,9 +586,8 @@ static int __init kyrofb_setup(char *options)
586} 586}
587#endif 587#endif
588 588
589static int kyrofb_ioctl(struct inode *inode, struct file *file, 589static int kyrofb_ioctl(struct fb_info *info,
590 unsigned int cmd, unsigned long arg, 590 unsigned int cmd, unsigned long arg)
591 struct fb_info *info)
592{ 591{
593 overlay_create ol_create; 592 overlay_create ol_create;
594 overlay_viewport_set ol_viewport_set; 593 overlay_viewport_set ol_viewport_set;
diff --git a/drivers/video/leo.c b/drivers/video/leo.c
index 494287f8f8bf..a23cfdb9d826 100644
--- a/drivers/video/leo.c
+++ b/drivers/video/leo.c
@@ -32,9 +32,8 @@ static int leo_setcolreg(unsigned, unsigned, unsigned, unsigned,
32 unsigned, struct fb_info *); 32 unsigned, struct fb_info *);
33static int leo_blank(int, struct fb_info *); 33static int leo_blank(int, struct fb_info *);
34 34
35static int leo_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 35static int leo_mmap(struct fb_info *, struct vm_area_struct *);
36static int leo_ioctl(struct inode *, struct file *, unsigned int, 36static int leo_ioctl(struct fb_info *, unsigned int, unsigned long);
37 unsigned long, struct fb_info *);
38static int leo_pan_display(struct fb_var_screeninfo *, struct fb_info *); 37static int leo_pan_display(struct fb_var_screeninfo *, struct fb_info *);
39 38
40/* 39/*
@@ -363,7 +362,7 @@ static struct sbus_mmap_map leo_mmap_map[] = {
363 { .size = 0 } 362 { .size = 0 }
364}; 363};
365 364
366static int leo_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 365static int leo_mmap(struct fb_info *info, struct vm_area_struct *vma)
367{ 366{
368 struct leo_par *par = (struct leo_par *)info->par; 367 struct leo_par *par = (struct leo_par *)info->par;
369 368
@@ -373,8 +372,7 @@ static int leo_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
373 vma); 372 vma);
374} 373}
375 374
376static int leo_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 375static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
377 unsigned long arg, struct fb_info *info)
378{ 376{
379 struct leo_par *par = (struct leo_par *) info->par; 377 struct leo_par *par = (struct leo_par *) info->par;
380 378
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index 1e74f4cca53b..4055ff6f5a81 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -865,9 +865,8 @@ static struct matrox_altout panellink_output = {
865 .name = "Panellink output", 865 .name = "Panellink output",
866}; 866};
867 867
868static int matroxfb_ioctl(struct inode *inode, struct file *file, 868static int matroxfb_ioctl(struct fb_info *info,
869 unsigned int cmd, unsigned long arg, 869 unsigned int cmd, unsigned long arg)
870 struct fb_info *info)
871{ 870{
872 void __user *argp = (void __user *)arg; 871 void __user *argp = (void __user *)arg;
873 MINFO_FROM_INFO(info); 872 MINFO_FROM_INFO(info);
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
index d52d7d825c41..27eb4bb4f89f 100644
--- a/drivers/video/matrox/matroxfb_crtc2.c
+++ b/drivers/video/matrox/matroxfb_crtc2.c
@@ -419,11 +419,10 @@ static int matroxfb_dh_get_vblank(const struct matroxfb_dh_fb_info* m2info, stru
419 return 0; 419 return 0;
420} 420}
421 421
422static int matroxfb_dh_ioctl(struct inode* inode, 422static int matroxfb_dh_ioctl(struct fb_info *info,
423 struct file* file,
424 unsigned int cmd, 423 unsigned int cmd,
425 unsigned long arg, 424 unsigned long arg)
426 struct fb_info* info) { 425{
427#define m2info (container_of(info, struct matroxfb_dh_fb_info, fbcon)) 426#define m2info (container_of(info, struct matroxfb_dh_fb_info, fbcon))
428 MINFO_FROM(m2info->primary_dev); 427 MINFO_FROM(m2info->primary_dev);
429 428
@@ -457,7 +456,7 @@ static int matroxfb_dh_ioctl(struct inode* inode,
457 case MATROXFB_GET_OUTPUT_MODE: 456 case MATROXFB_GET_OUTPUT_MODE:
458 case MATROXFB_GET_ALL_OUTPUTS: 457 case MATROXFB_GET_ALL_OUTPUTS:
459 { 458 {
460 return ACCESS_FBINFO(fbcon.fbops)->fb_ioctl(inode, file, cmd, arg, &ACCESS_FBINFO(fbcon)); 459 return ACCESS_FBINFO(fbcon.fbops)->fb_ioctl(&ACCESS_FBINFO(fbcon), cmd, arg);
461 } 460 }
462 case MATROXFB_SET_OUTPUT_CONNECTION: 461 case MATROXFB_SET_OUTPUT_CONNECTION:
463 { 462 {
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c
index a1f2c5e8fc88..6019710dc298 100644
--- a/drivers/video/matrox/matroxfb_maven.c
+++ b/drivers/video/matrox/matroxfb_maven.c
@@ -968,7 +968,7 @@ static inline int maven_compute_timming(struct maven_data* md,
968 return 0; 968 return 0;
969} 969}
970 970
971static inline int maven_program_timming(struct maven_data* md, 971static int maven_program_timming(struct maven_data* md,
972 const struct mavenregs* m) { 972 const struct mavenregs* m) {
973 struct i2c_client* c = md->client; 973 struct i2c_client* c = md->client;
974 974
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index e18c9f98a401..747602aa5615 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -853,7 +853,7 @@ static int neofb_set_par(struct fb_info *info)
853 /* If the user did not specify any display devices, then... */ 853 /* If the user did not specify any display devices, then... */
854 if (par->PanelDispCntlReg1 == 0x00) { 854 if (par->PanelDispCntlReg1 == 0x00) {
855 /* Default to internal (i.e., LCD) only. */ 855 /* Default to internal (i.e., LCD) only. */
856 par->PanelDispCntlReg1 |= 0x02; 856 par->PanelDispCntlReg1 = vga_rgfx(NULL, 0x20) & 0x03;
857 } 857 }
858 858
859 /* If we are using a fixed mode, then tell the chip we are. */ 859 /* If we are using a fixed mode, then tell the chip we are. */
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c
index b251e754e16c..0d1957505359 100644
--- a/drivers/video/p9100.c
+++ b/drivers/video/p9100.c
@@ -31,9 +31,8 @@ static int p9100_setcolreg(unsigned, unsigned, unsigned, unsigned,
31 unsigned, struct fb_info *); 31 unsigned, struct fb_info *);
32static int p9100_blank(int, struct fb_info *); 32static int p9100_blank(int, struct fb_info *);
33 33
34static int p9100_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 34static int p9100_mmap(struct fb_info *, struct vm_area_struct *);
35static int p9100_ioctl(struct inode *, struct file *, unsigned int, 35static int p9100_ioctl(struct fb_info *, unsigned int, unsigned long);
36 unsigned long, struct fb_info *);
37 36
38/* 37/*
39 * Frame buffer operations 38 * Frame buffer operations
@@ -222,7 +221,7 @@ static struct sbus_mmap_map p9100_mmap_map[] = {
222 { 0, 0, 0 } 221 { 0, 0, 0 }
223}; 222};
224 223
225static int p9100_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 224static int p9100_mmap(struct fb_info *info, struct vm_area_struct *vma)
226{ 225{
227 struct p9100_par *par = (struct p9100_par *)info->par; 226 struct p9100_par *par = (struct p9100_par *)info->par;
228 227
@@ -232,8 +231,8 @@ static int p9100_mmap(struct fb_info *info, struct file *file, struct vm_area_st
232 vma); 231 vma);
233} 232}
234 233
235static int p9100_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 234static int p9100_ioctl(struct fb_info *info, unsigned int cmd,
236 unsigned long arg, struct fb_info *info) 235 unsigned long arg)
237{ 236{
238 struct p9100_par *par = (struct p9100_par *) info->par; 237 struct p9100_par *par = (struct p9100_par *) info->par;
239 238
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
index 2e11b601c488..0e78ddc81583 100644
--- a/drivers/video/pm3fb.c
+++ b/drivers/video/pm3fb.c
@@ -657,9 +657,7 @@ static void pm3fb_set_disp(const void *par, struct display *disp,
657static void pm3fb_detect(void); 657static void pm3fb_detect(void);
658static int pm3fb_pan_display(const struct fb_var_screeninfo *var, 658static int pm3fb_pan_display(const struct fb_var_screeninfo *var,
659 struct fb_info_gen *info); 659 struct fb_info_gen *info);
660static int pm3fb_ioctl(struct inode *inode, struct file *file, 660static int pm3fb_ioctl(struct fb_info *info, u_int cmd, u_long arg);
661 u_int cmd, u_long arg, int con,
662 struct fb_info *info);
663 661
664 662
665/* the struct that hold them together */ 663/* the struct that hold them together */
@@ -3438,9 +3436,7 @@ static int pm3fb_pan_display(const struct fb_var_screeninfo *var,
3438 return 0; 3436 return 0;
3439} 3437}
3440 3438
3441static int pm3fb_ioctl(struct inode *inode, struct file *file, 3439static int pm3fb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
3442 u_int cmd, u_long arg, int con,
3443 struct fb_info *info)
3444{ 3440{
3445 struct pm3fb_info *l_fb_info = (struct pm3fb_info *) info; 3441 struct pm3fb_info *l_fb_info = (struct pm3fb_info *) info;
3446 u32 cm, i; 3442 u32 cm, i;
diff --git a/drivers/video/pmag-aa-fb.c b/drivers/video/pmag-aa-fb.c
index 28d1fe5fe340..d92f352211ef 100644
--- a/drivers/video/pmag-aa-fb.c
+++ b/drivers/video/pmag-aa-fb.c
@@ -299,8 +299,7 @@ static int aafb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
299 return -EINVAL; 299 return -EINVAL;
300} 300}
301 301
302static int aafb_ioctl(struct inode *inode, struct file *file, u32 cmd, 302static int aafb_ioctl(struct fb_info *info, u32 cmd, unsigned long arg)
303 unsigned long arg, int con, struct fb_info *info)
304{ 303{
305 /* TODO: Not yet implemented */ 304 /* TODO: Not yet implemented */
306 return -ENOIOCTLCMD; 305 return -ENOIOCTLCMD;
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 9fc10b9e6f57..53ad61f1038c 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -395,7 +395,7 @@ static int pxafb_blank(int blank, struct fb_info *info)
395 return 0; 395 return 0;
396} 396}
397 397
398static int pxafb_mmap(struct fb_info *info, struct file *file, 398static int pxafb_mmap(struct fb_info *info,
399 struct vm_area_struct *vma) 399 struct vm_area_struct *vma)
400{ 400{
401 struct pxafb_info *fbi = (struct pxafb_info *)info; 401 struct pxafb_info *fbi = (struct pxafb_info *)info;
diff --git a/drivers/video/radeonfb.c b/drivers/video/radeonfb.c
index 600318f708f2..db9fb9074dbc 100644
--- a/drivers/video/radeonfb.c
+++ b/drivers/video/radeonfb.c
@@ -1497,8 +1497,8 @@ static int radeonfb_pan_display (struct fb_var_screeninfo *var,
1497} 1497}
1498 1498
1499 1499
1500static int radeonfb_ioctl (struct inode *inode, struct file *file, unsigned int cmd, 1500static int radeonfb_ioctl (struct fb_info *info, unsigned int cmd,
1501 unsigned long arg, struct fb_info *info) 1501 unsigned long arg)
1502{ 1502{
1503 struct radeonfb_info *rinfo = (struct radeonfb_info *) info; 1503 struct radeonfb_info *rinfo = (struct radeonfb_info *) info;
1504 unsigned int tmp; 1504 unsigned int tmp;
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index 087e58689e4c..8a893ce7040d 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -815,7 +815,7 @@ static int sa1100fb_blank(int blank, struct fb_info *info)
815 return 0; 815 return 0;
816} 816}
817 817
818static int sa1100fb_mmap(struct fb_info *info, struct file *file, 818static int sa1100fb_mmap(struct fb_info *info,
819 struct vm_area_struct *vma) 819 struct vm_area_struct *vma)
820{ 820{
821 struct sa1100fb_info *fbi = (struct sa1100fb_info *)info; 821 struct sa1100fb_info *fbi = (struct sa1100fb_info *)info;
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c
index 3a74a63dd4f2..a4d7cc51ce0b 100644
--- a/drivers/video/sbuslib.c
+++ b/drivers/video/sbuslib.c
@@ -199,8 +199,7 @@ struct fbcmap32 {
199#define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) 199#define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32)
200#define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) 200#define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32)
201 201
202static int fbiogetputcmap(struct file *file, struct fb_info *info, 202static int fbiogetputcmap(struct fb_info *info, unsigned int cmd, unsigned long arg)
203 unsigned int cmd, unsigned long arg)
204{ 203{
205 struct fbcmap32 __user *argp = (void __user *)arg; 204 struct fbcmap32 __user *argp = (void __user *)arg;
206 struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p)); 205 struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p));
@@ -216,10 +215,10 @@ static int fbiogetputcmap(struct file *file, struct fb_info *info,
216 ret |= put_user(compat_ptr(addr), &p->blue); 215 ret |= put_user(compat_ptr(addr), &p->blue);
217 if (ret) 216 if (ret)
218 return -EFAULT; 217 return -EFAULT;
219 return info->fbops->fb_ioctl(file->f_dentry->d_inode, file, 218 return info->fbops->fb_ioctl(info,
220 (cmd == FBIOPUTCMAP32) ? 219 (cmd == FBIOPUTCMAP32) ?
221 FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC, 220 FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC,
222 (unsigned long)p, info); 221 (unsigned long)p);
223} 222}
224 223
225struct fbcursor32 { 224struct fbcursor32 {
@@ -236,8 +235,7 @@ struct fbcursor32 {
236#define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) 235#define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32)
237#define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) 236#define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32)
238 237
239static int fbiogscursor(struct file *file, struct fb_info *info, 238static int fbiogscursor(struct fb_info *info, unsigned long arg)
240 unsigned long arg)
241{ 239{
242 struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p)); 240 struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p));
243 struct fbcursor32 __user *argp = (void __user *)arg; 241 struct fbcursor32 __user *argp = (void __user *)arg;
@@ -260,12 +258,10 @@ static int fbiogscursor(struct file *file, struct fb_info *info,
260 ret |= put_user(compat_ptr(addr), &p->image); 258 ret |= put_user(compat_ptr(addr), &p->image);
261 if (ret) 259 if (ret)
262 return -EFAULT; 260 return -EFAULT;
263 return info->fbops->fb_ioctl(file->f_dentry->d_inode, file, 261 return info->fbops->fb_ioctl(info, FBIOSCURSOR, (unsigned long)p);
264 FBIOSCURSOR, (unsigned long)p, info);
265} 262}
266 263
267long sbusfb_compat_ioctl(struct file *file, unsigned int cmd, 264int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
268 unsigned long arg, struct fb_info *info)
269{ 265{
270 switch (cmd) { 266 switch (cmd) {
271 case FBIOGTYPE: 267 case FBIOGTYPE:
@@ -278,14 +274,13 @@ long sbusfb_compat_ioctl(struct file *file, unsigned int cmd,
278 case FBIOSCURPOS: 274 case FBIOSCURPOS:
279 case FBIOGCURPOS: 275 case FBIOGCURPOS:
280 case FBIOGCURMAX: 276 case FBIOGCURMAX:
281 return info->fbops->fb_ioctl(file->f_dentry->d_inode, 277 return info->fbops->fb_ioctl(info, cmd, arg);
282 file, cmd, arg, info);
283 case FBIOPUTCMAP32: 278 case FBIOPUTCMAP32:
284 return fbiogetputcmap(file, info, cmd, arg); 279 return fbiogetputcmap(info, cmd, arg);
285 case FBIOGETCMAP32: 280 case FBIOGETCMAP32:
286 return fbiogetputcmap(file, info, cmd, arg); 281 return fbiogetputcmap(info, cmd, arg);
287 case FBIOSCURSOR32: 282 case FBIOSCURSOR32:
288 return fbiogscursor(file, info, arg); 283 return fbiogscursor(info, arg);
289 default: 284 default:
290 return -ENOIOCTLCMD; 285 return -ENOIOCTLCMD;
291 } 286 }
diff --git a/drivers/video/sbuslib.h b/drivers/video/sbuslib.h
index b470e52ce9e2..492828c3fe8f 100644
--- a/drivers/video/sbuslib.h
+++ b/drivers/video/sbuslib.h
@@ -20,7 +20,7 @@ extern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
20int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, 20int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
21 struct fb_info *info, 21 struct fb_info *info,
22 int type, int fb_depth, unsigned long fb_size); 22 int type, int fb_depth, unsigned long fb_size);
23long sbusfb_compat_ioctl(struct file *file, unsigned int cmd, 23int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
24 unsigned long arg, struct fb_info *info); 24 unsigned long arg);
25 25
26#endif /* _SBUSLIB_H */ 26#endif /* _SBUSLIB_H */
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
index 7054660767e4..2e6df1fcb2b9 100644
--- a/drivers/video/sgivwfb.c
+++ b/drivers/video/sgivwfb.c
@@ -115,7 +115,7 @@ static int sgivwfb_set_par(struct fb_info *info);
115static int sgivwfb_setcolreg(u_int regno, u_int red, u_int green, 115static int sgivwfb_setcolreg(u_int regno, u_int red, u_int green,
116 u_int blue, u_int transp, 116 u_int blue, u_int transp,
117 struct fb_info *info); 117 struct fb_info *info);
118static int sgivwfb_mmap(struct fb_info *info, struct file *file, 118static int sgivwfb_mmap(struct fb_info *info,
119 struct vm_area_struct *vma); 119 struct vm_area_struct *vma);
120 120
121static struct fb_ops sgivwfb_ops = { 121static struct fb_ops sgivwfb_ops = {
@@ -706,7 +706,7 @@ static int sgivwfb_setcolreg(u_int regno, u_int red, u_int green,
706 return 0; 706 return 0;
707} 707}
708 708
709static int sgivwfb_mmap(struct fb_info *info, struct file *file, 709static int sgivwfb_mmap(struct fb_info *info,
710 struct vm_area_struct *vma) 710 struct vm_area_struct *vma)
711{ 711{
712 unsigned long size = vma->vm_end - vma->vm_start; 712 unsigned long size = vma->vm_end - vma->vm_start;
@@ -723,7 +723,6 @@ static int sgivwfb_mmap(struct fb_info *info, struct file *file,
723 if (remap_pfn_range(vma, vma->vm_start, offset >> PAGE_SHIFT, 723 if (remap_pfn_range(vma, vma->vm_start, offset >> PAGE_SHIFT,
724 size, vma->vm_page_prot)) 724 size, vma->vm_page_prot))
725 return -EAGAIN; 725 return -EAGAIN;
726 vma->vm_file = file;
727 printk(KERN_DEBUG "sgivwfb: mmap framebuffer P(%lx)->V(%lx)\n", 726 printk(KERN_DEBUG "sgivwfb: mmap framebuffer P(%lx)->V(%lx)\n",
728 offset, vma->vm_start); 727 offset, vma->vm_start);
729 return 0; 728 return 0;
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index dea1a46c67c4..8adf5bf91eee 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -1743,13 +1743,14 @@ sisfb_blank(int blank, struct fb_info *info)
1743 1743
1744/* ----------- FBDev related routines for all series ---------- */ 1744/* ----------- FBDev related routines for all series ---------- */
1745 1745
1746static int 1746#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
1747sisfb_ioctl(struct inode *inode, struct file *file, 1747static int sisfb_ioctl(struct fb_info *info, unsigned int cmd,
1748 unsigned int cmd, unsigned long arg, 1748 unsigned long arg)
1749#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) 1749#else
1750 int con, 1750static int sisfb_ioctl(struct inode *inode, struct file *file,
1751 unsigned int cmd, unsigned long arg,
1752 struct fb_info *info)
1751#endif 1753#endif
1752 struct fb_info *info)
1753{ 1754{
1754 struct sis_video_info *ivideo = (struct sis_video_info *)info->par; 1755 struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
1755 struct sis_memreq sismemreq; 1756 struct sis_memreq sismemreq;
@@ -1924,19 +1925,6 @@ sisfb_ioctl(struct inode *inode, struct file *file,
1924 return 0; 1925 return 0;
1925} 1926}
1926 1927
1927#ifdef SIS_NEW_CONFIG_COMPAT
1928static long
1929sisfb_compat_ioctl(struct file *f, unsigned int cmd, unsigned long arg, struct fb_info *info)
1930{
1931 int ret;
1932
1933 lock_kernel();
1934 ret = sisfb_ioctl(NULL, f, cmd, arg, info);
1935 unlock_kernel();
1936 return ret;
1937}
1938#endif
1939
1940static int 1928static int
1941sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info) 1929sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info)
1942{ 1930{
@@ -2007,7 +1995,7 @@ static struct fb_ops sisfb_ops = {
2007#endif 1995#endif
2008 .fb_sync = fbcon_sis_sync, 1996 .fb_sync = fbcon_sis_sync,
2009#ifdef SIS_NEW_CONFIG_COMPAT 1997#ifdef SIS_NEW_CONFIG_COMPAT
2010 .fb_compat_ioctl= sisfb_compat_ioctl, 1998 .fb_compat_ioctl= sisfb_ioctl,
2011#endif 1999#endif
2012 .fb_ioctl = sisfb_ioctl 2000 .fb_ioctl = sisfb_ioctl
2013}; 2001};
diff --git a/drivers/video/sis/sis_main.h b/drivers/video/sis/sis_main.h
index 445bcbba03ae..70b6df371b8e 100644
--- a/drivers/video/sis/sis_main.h
+++ b/drivers/video/sis/sis_main.h
@@ -727,9 +727,14 @@ static int sisfb_ioctl(struct inode *inode, struct file *file,
727#endif 727#endif
728 728
729#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) 729#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
730#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
731static int sisfb_ioctl(struct fb_info *info, unsigned int cmd,
732 unsigned long arg);
733#else
730static int sisfb_ioctl(struct inode *inode, struct file *file, 734static int sisfb_ioctl(struct inode *inode, struct file *file,
731 unsigned int cmd, unsigned long arg, 735 unsigned int cmd, unsigned long arg,
732 struct fb_info *info); 736 struct fb_info *info);
737#endif
733static int sisfb_set_par(struct fb_info *info); 738static int sisfb_set_par(struct fb_info *info);
734static int sisfb_blank(int blank, 739static int sisfb_blank(int blank,
735 struct fb_info *info); 740 struct fb_info *info);
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c
index 8a5ce210bb27..99921df35474 100644
--- a/drivers/video/sstfb.c
+++ b/drivers/video/sstfb.c
@@ -771,8 +771,7 @@ static int sstfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
771 return 0; 771 return 0;
772} 772}
773 773
774static int sstfb_ioctl(struct inode *inode, struct file *file, 774static int sstfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
775 u_int cmd, u_long arg, struct fb_info *info )
776{ 775{
777 struct sstfb_par *par = info->par; 776 struct sstfb_par *par = info->par;
778 struct pci_dev *sst_dev = par->dev; 777 struct pci_dev *sst_dev = par->dev;
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c
index 2b27b4474001..95b918229d9b 100644
--- a/drivers/video/tcx.c
+++ b/drivers/video/tcx.c
@@ -33,9 +33,8 @@ static int tcx_setcolreg(unsigned, unsigned, unsigned, unsigned,
33 unsigned, struct fb_info *); 33 unsigned, struct fb_info *);
34static int tcx_blank(int, struct fb_info *); 34static int tcx_blank(int, struct fb_info *);
35 35
36static int tcx_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 36static int tcx_mmap(struct fb_info *, struct vm_area_struct *);
37static int tcx_ioctl(struct inode *, struct file *, unsigned int, 37static int tcx_ioctl(struct fb_info *, unsigned int, unsigned long);
38 unsigned long, struct fb_info *);
39static int tcx_pan_display(struct fb_var_screeninfo *, struct fb_info *); 38static int tcx_pan_display(struct fb_var_screeninfo *, struct fb_info *);
40 39
41/* 40/*
@@ -302,7 +301,7 @@ static struct sbus_mmap_map __tcx_mmap_map[TCX_MMAP_ENTRIES] = {
302 { .size = 0 } 301 { .size = 0 }
303}; 302};
304 303
305static int tcx_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 304static int tcx_mmap(struct fb_info *info, struct vm_area_struct *vma)
306{ 305{
307 struct tcx_par *par = (struct tcx_par *)info->par; 306 struct tcx_par *par = (struct tcx_par *)info->par;
308 307
@@ -312,8 +311,8 @@ static int tcx_mmap(struct fb_info *info, struct file *file, struct vm_area_stru
312 vma); 311 vma);
313} 312}
314 313
315static int tcx_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 314static int tcx_ioctl(struct fb_info *info, unsigned int cmd,
316 unsigned long arg, struct fb_info *info) 315 unsigned long arg)
317{ 316{
318 struct tcx_par *par = (struct tcx_par *) info->par; 317 struct tcx_par *par = (struct tcx_par *) info->par;
319 318
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
index ffa1ad474226..53208cb58396 100644
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -81,7 +81,7 @@ static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
81 u_int transp, struct fb_info *info); 81 u_int transp, struct fb_info *info);
82static int vfb_pan_display(struct fb_var_screeninfo *var, 82static int vfb_pan_display(struct fb_var_screeninfo *var,
83 struct fb_info *info); 83 struct fb_info *info);
84static int vfb_mmap(struct fb_info *info, struct file *file, 84static int vfb_mmap(struct fb_info *info,
85 struct vm_area_struct *vma); 85 struct vm_area_struct *vma);
86 86
87static struct fb_ops vfb_ops = { 87static struct fb_ops vfb_ops = {
@@ -368,7 +368,7 @@ static int vfb_pan_display(struct fb_var_screeninfo *var,
368 * Most drivers don't need their own mmap function 368 * Most drivers don't need their own mmap function
369 */ 369 */
370 370
371static int vfb_mmap(struct fb_info *info, struct file *file, 371static int vfb_mmap(struct fb_info *info,
372 struct vm_area_struct *vma) 372 struct vm_area_struct *vma)
373{ 373{
374 return -EINVAL; 374 return -EINVAL;