[PATCH] fbdev: Sanitize ->fb_mmap prototype

No need for a file argument. If we'd really need it it's in vma->vm_file
already. gbefb and sgivwfb used to set vma->vm_file to the file argument, but
the kernel alrady did that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Christoph Hellwig and committed by Linus Torvalds 216d526c 67a6680d

+35 -39
+2 -4
drivers/video/68328fb.c
··· 102 102 u_int transp, struct fb_info *info); 103 103 static int mc68x328fb_pan_display(struct fb_var_screeninfo *var, 104 104 struct fb_info *info); 105 - static int mc68x328fb_mmap(struct fb_info *info, struct file *file, 106 - struct vm_area_struct *vma); 105 + static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma); 107 106 108 107 static struct fb_ops mc68x328fb_ops = { 109 108 .fb_check_var = mc68x328fb_check_var, ··· 397 398 * Most drivers don't need their own mmap function 398 399 */ 399 400 400 - static int mc68x328fb_mmap(struct fb_info *info, struct file *file, 401 - struct vm_area_struct *vma) 401 + static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma) 402 402 { 403 403 #ifndef MMU 404 404 /* this is uClinux (no MMU) specific code */
+1 -1
drivers/video/acornfb.c
··· 883 883 * Note that we are entered with the kernel locked. 884 884 */ 885 885 static int 886 - acornfb_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 886 + acornfb_mmap(struct fb_info *info, struct vm_area_struct *vma) 887 887 { 888 888 unsigned long off, start; 889 889 u32 len;
+1 -1
drivers/video/amba-clcd.c
··· 307 307 return 0; 308 308 } 309 309 310 - static int clcdfb_mmap(struct fb_info *info, struct file *file, 310 + static int clcdfb_mmap(struct fb_info *info, 311 311 struct vm_area_struct *vma) 312 312 { 313 313 struct clcd_fb *fb = to_clcd(info);
+2 -2
drivers/video/aty/atyfb_base.c
··· 243 243 extern void atyfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); 244 244 extern void atyfb_imageblit(struct fb_info *info, const struct fb_image *image); 245 245 #ifdef __sparc__ 246 - static int atyfb_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma); 246 + static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma); 247 247 #endif 248 248 static int atyfb_sync(struct fb_info *info); 249 249 ··· 1843 1843 } 1844 1844 1845 1845 #ifdef __sparc__ 1846 - static int atyfb_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 1846 + static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma) 1847 1847 { 1848 1848 struct atyfb_par *par = (struct atyfb_par *) info->par; 1849 1849 unsigned int size, page, map_size = 0;
+1 -1
drivers/video/au1100fb.c
··· 379 379 * Map video memory in user space. We don't use the generic fb_mmap method mainly 380 380 * to allow the use of the TLB streaming flag (CCA=6) 381 381 */ 382 - int au1100fb_fb_mmap(struct fb_info *fbi, struct file *file, struct vm_area_struct *vma) 382 + int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) 383 383 { 384 384 struct au1100fb_device *fbdev = to_au1100fb_device(fbi); 385 385 unsigned int len;
+2 -2
drivers/video/bw2.c
··· 35 35 36 36 static int bw2_blank(int, struct fb_info *); 37 37 38 - static int bw2_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 38 + static int bw2_mmap(struct fb_info *, struct vm_area_struct *); 39 39 static int bw2_ioctl(struct fb_info *, unsigned int, unsigned long); 40 40 41 41 /* ··· 168 168 { .size = 0 } 169 169 }; 170 170 171 - static int bw2_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 171 + static int bw2_mmap(struct fb_info *info, struct vm_area_struct *vma) 172 172 { 173 173 struct bw2_par *par = (struct bw2_par *)info->par; 174 174
+2 -2
drivers/video/cg14.c
··· 31 31 static int cg14_setcolreg(unsigned, unsigned, unsigned, unsigned, 32 32 unsigned, struct fb_info *); 33 33 34 - static int cg14_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 34 + static int cg14_mmap(struct fb_info *, struct vm_area_struct *); 35 35 static int cg14_ioctl(struct fb_info *, unsigned int, unsigned long); 36 36 static int cg14_pan_display(struct fb_var_screeninfo *, struct fb_info *); 37 37 ··· 267 267 return 0; 268 268 } 269 269 270 - static int cg14_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 270 + static int cg14_mmap(struct fb_info *info, struct vm_area_struct *vma) 271 271 { 272 272 struct cg14_par *par = (struct cg14_par *) info->par; 273 273
+2 -2
drivers/video/cg3.c
··· 33 33 unsigned, struct fb_info *); 34 34 static int cg3_blank(int, struct fb_info *); 35 35 36 - static int cg3_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 36 + static int cg3_mmap(struct fb_info *, struct vm_area_struct *); 37 37 static int cg3_ioctl(struct fb_info *, unsigned int, unsigned long); 38 38 39 39 /* ··· 229 229 { .size = 0 } 230 230 }; 231 231 232 - static int cg3_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 232 + static int cg3_mmap(struct fb_info *info, struct vm_area_struct *vma) 233 233 { 234 234 struct cg3_par *par = (struct cg3_par *)info->par; 235 235
+2 -2
drivers/video/cg6.c
··· 36 36 static void cg6_imageblit(struct fb_info *, const struct fb_image *); 37 37 static void cg6_fillrect(struct fb_info *, const struct fb_fillrect *); 38 38 static int cg6_sync(struct fb_info *); 39 - static int cg6_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 39 + static int cg6_mmap(struct fb_info *, struct vm_area_struct *); 40 40 static int cg6_ioctl(struct fb_info *, unsigned int, unsigned long); 41 41 42 42 /* ··· 523 523 { .size = 0 } 524 524 }; 525 525 526 - static int cg6_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 526 + static int cg6_mmap(struct fb_info *info, struct vm_area_struct *vma) 527 527 { 528 528 struct cg6_par *par = (struct cg6_par *)info->par; 529 529
+2 -2
drivers/video/controlfb.c
··· 128 128 static int controlfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, 129 129 u_int transp, struct fb_info *info); 130 130 static int controlfb_blank(int blank_mode, struct fb_info *info); 131 - static int controlfb_mmap(struct fb_info *info, struct file *file, 131 + static int controlfb_mmap(struct fb_info *info, 132 132 struct vm_area_struct *vma); 133 133 static int controlfb_set_par (struct fb_info *info); 134 134 static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *info); ··· 280 280 * for controlfb. 281 281 * Note there's no locking in here; it's done in fb_mmap() in fbmem.c. 282 282 */ 283 - static int controlfb_mmap(struct fb_info *info, struct file *file, 283 + static int controlfb_mmap(struct fb_info *info, 284 284 struct vm_area_struct *vma) 285 285 { 286 286 unsigned long off, start;
+1 -1
drivers/video/fbmem.c
··· 1135 1135 if (fb->fb_mmap) { 1136 1136 int res; 1137 1137 lock_kernel(); 1138 - res = fb->fb_mmap(info, file, vma); 1138 + res = fb->fb_mmap(info, vma); 1139 1139 unlock_kernel(); 1140 1140 return res; 1141 1141 }
+2 -2
drivers/video/ffb.c
··· 37 37 static void ffb_fillrect(struct fb_info *, const struct fb_fillrect *); 38 38 static void ffb_copyarea(struct fb_info *, const struct fb_copyarea *); 39 39 static int ffb_sync(struct fb_info *); 40 - static int ffb_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 40 + static int ffb_mmap(struct fb_info *, struct vm_area_struct *); 41 41 static int ffb_ioctl(struct fb_info *, unsigned int, unsigned long); 42 42 static int ffb_pan_display(struct fb_var_screeninfo *, struct fb_info *); 43 43 ··· 838 838 { .size = 0 } 839 839 }; 840 840 841 - static int ffb_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 841 + static int ffb_mmap(struct fb_info *info, struct vm_area_struct *vma) 842 842 { 843 843 struct ffb_par *par = (struct ffb_par *)info->par; 844 844
+1 -2
drivers/video/gbefb.c
··· 979 979 return 0; 980 980 } 981 981 982 - static int gbefb_mmap(struct fb_info *info, struct file *file, 982 + static int gbefb_mmap(struct fb_info *info, 983 983 struct vm_area_struct *vma) 984 984 { 985 985 unsigned long size = vma->vm_end - vma->vm_start; ··· 1000 1000 pgprot_fb(pgprot_val(vma->vm_page_prot)); 1001 1001 1002 1002 vma->vm_flags |= VM_IO | VM_RESERVED; 1003 - vma->vm_file = file; 1004 1003 1005 1004 /* look for the starting tile */ 1006 1005 tile = &gbe_tiles.cpu[offset >> TILE_SHIFT];
+1 -1
drivers/video/igafb.c
··· 219 219 } 220 220 221 221 #ifdef __sparc__ 222 - static int igafb_mmap(struct fb_info *info, struct file *file, 222 + static int igafb_mmap(struct fb_info *info, 223 223 struct vm_area_struct *vma) 224 224 { 225 225 struct iga_par *par = (struct iga_par *)info->par;
+2 -2
drivers/video/leo.c
··· 32 32 unsigned, struct fb_info *); 33 33 static int leo_blank(int, struct fb_info *); 34 34 35 - static int leo_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 35 + static int leo_mmap(struct fb_info *, struct vm_area_struct *); 36 36 static int leo_ioctl(struct fb_info *, unsigned int, unsigned long); 37 37 static int leo_pan_display(struct fb_var_screeninfo *, struct fb_info *); 38 38 ··· 362 362 { .size = 0 } 363 363 }; 364 364 365 - static int leo_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 365 + static int leo_mmap(struct fb_info *info, struct vm_area_struct *vma) 366 366 { 367 367 struct leo_par *par = (struct leo_par *)info->par; 368 368
+2 -2
drivers/video/p9100.c
··· 31 31 unsigned, struct fb_info *); 32 32 static int p9100_blank(int, struct fb_info *); 33 33 34 - static int p9100_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 34 + static int p9100_mmap(struct fb_info *, struct vm_area_struct *); 35 35 static int p9100_ioctl(struct fb_info *, unsigned int, unsigned long); 36 36 37 37 /* ··· 221 221 { 0, 0, 0 } 222 222 }; 223 223 224 - static int p9100_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 224 + static int p9100_mmap(struct fb_info *info, struct vm_area_struct *vma) 225 225 { 226 226 struct p9100_par *par = (struct p9100_par *)info->par; 227 227
+1 -1
drivers/video/pxafb.c
··· 395 395 return 0; 396 396 } 397 397 398 - static int pxafb_mmap(struct fb_info *info, struct file *file, 398 + static int pxafb_mmap(struct fb_info *info, 399 399 struct vm_area_struct *vma) 400 400 { 401 401 struct pxafb_info *fbi = (struct pxafb_info *)info;
+1 -1
drivers/video/sa1100fb.c
··· 815 815 return 0; 816 816 } 817 817 818 - static int sa1100fb_mmap(struct fb_info *info, struct file *file, 818 + static int sa1100fb_mmap(struct fb_info *info, 819 819 struct vm_area_struct *vma) 820 820 { 821 821 struct sa1100fb_info *fbi = (struct sa1100fb_info *)info;
+2 -3
drivers/video/sgivwfb.c
··· 115 115 static int sgivwfb_setcolreg(u_int regno, u_int red, u_int green, 116 116 u_int blue, u_int transp, 117 117 struct fb_info *info); 118 - static int sgivwfb_mmap(struct fb_info *info, struct file *file, 118 + static int sgivwfb_mmap(struct fb_info *info, 119 119 struct vm_area_struct *vma); 120 120 121 121 static struct fb_ops sgivwfb_ops = { ··· 706 706 return 0; 707 707 } 708 708 709 - static int sgivwfb_mmap(struct fb_info *info, struct file *file, 709 + static int sgivwfb_mmap(struct fb_info *info, 710 710 struct vm_area_struct *vma) 711 711 { 712 712 unsigned long size = vma->vm_end - vma->vm_start; ··· 723 723 if (remap_pfn_range(vma, vma->vm_start, offset >> PAGE_SHIFT, 724 724 size, vma->vm_page_prot)) 725 725 return -EAGAIN; 726 - vma->vm_file = file; 727 726 printk(KERN_DEBUG "sgivwfb: mmap framebuffer P(%lx)->V(%lx)\n", 728 727 offset, vma->vm_start); 729 728 return 0;
+2 -2
drivers/video/tcx.c
··· 33 33 unsigned, struct fb_info *); 34 34 static int tcx_blank(int, struct fb_info *); 35 35 36 - static int tcx_mmap(struct fb_info *, struct file *, struct vm_area_struct *); 36 + static int tcx_mmap(struct fb_info *, struct vm_area_struct *); 37 37 static int tcx_ioctl(struct fb_info *, unsigned int, unsigned long); 38 38 static int tcx_pan_display(struct fb_var_screeninfo *, struct fb_info *); 39 39 ··· 301 301 { .size = 0 } 302 302 }; 303 303 304 - static int tcx_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) 304 + static int tcx_mmap(struct fb_info *info, struct vm_area_struct *vma) 305 305 { 306 306 struct tcx_par *par = (struct tcx_par *)info->par; 307 307
+2 -2
drivers/video/vfb.c
··· 81 81 u_int transp, struct fb_info *info); 82 82 static int vfb_pan_display(struct fb_var_screeninfo *var, 83 83 struct fb_info *info); 84 - static int vfb_mmap(struct fb_info *info, struct file *file, 84 + static int vfb_mmap(struct fb_info *info, 85 85 struct vm_area_struct *vma); 86 86 87 87 static struct fb_ops vfb_ops = { ··· 368 368 * Most drivers don't need their own mmap function 369 369 */ 370 370 371 - static int vfb_mmap(struct fb_info *info, struct file *file, 371 + static int vfb_mmap(struct fb_info *info, 372 372 struct vm_area_struct *vma) 373 373 { 374 374 return -EINVAL;
+1 -1
include/linux/fb.h
··· 616 616 unsigned long arg); 617 617 618 618 /* perform fb specific mmap */ 619 - int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); 619 + int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma); 620 620 621 621 /* save current hardware state */ 622 622 void (*fb_save_state)(struct fb_info *info);