Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video/sis/: remove compat code

This patch removes compat code for older kernel versions.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: <thomas@winischhofer.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Adrian Bunk and committed by
Linus Torvalds
14aefd1b 0b9cf3aa

+17 -62
-1
drivers/video/sis/init.h
··· 73 73 #ifdef SIS_CP 74 74 #undef SIS_CP 75 75 #endif 76 - #include <linux/version.h> 77 76 #include <linux/types.h> 78 77 #include <asm/io.h> 79 78 #include <linux/fb.h>
-1
drivers/video/sis/init301.h
··· 67 67 #ifdef SIS_CP 68 68 #undef SIS_CP 69 69 #endif 70 - #include <linux/version.h> 71 70 #include <linux/types.h> 72 71 #include <asm/io.h> 73 72 #include <linux/fb.h>
-1
drivers/video/sis/initextlfb.c
··· 30 30 #include "vgatypes.h" 31 31 #include "vstruct.h" 32 32 33 - #include <linux/version.h> 34 33 #include <linux/types.h> 35 34 #include <linux/fb.h> 36 35
-1
drivers/video/sis/osdef.h
··· 87 87 /**********************************************************************/ 88 88 89 89 #ifdef SIS_LINUX_KERNEL 90 - #include <linux/version.h> 91 90 92 91 #ifdef CONFIG_FB_SIS_300 93 92 #define SIS300
+5 -17
drivers/video/sis/sis.h
··· 24 24 #ifndef _SIS_H_ 25 25 #define _SIS_H_ 26 26 27 - #include <linux/version.h> 28 - 29 27 #include "osdef.h" 30 28 #include <video/sisfb.h> 31 29 ··· 39 41 #ifdef CONFIG_COMPAT 40 42 #define SIS_NEW_CONFIG_COMPAT 41 43 #endif /* CONFIG_COMPAT */ 42 - 43 - #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8) 44 - #define SIS_IOTYPE1 void __iomem 45 - #define SIS_IOTYPE2 __iomem 46 - #define SISINITSTATIC static 47 - #else 48 - #define SIS_IOTYPE1 unsigned char 49 - #define SIS_IOTYPE2 50 - #define SISINITSTATIC 51 - #endif 52 44 53 45 #undef SISFBDEBUG 54 46 ··· 493 505 494 506 unsigned long UMAsize, LFBsize; 495 507 496 - SIS_IOTYPE1 *video_vbase; 497 - SIS_IOTYPE1 *mmio_vbase; 508 + void __iomem *video_vbase; 509 + void __iomem *mmio_vbase; 498 510 499 511 unsigned char *bios_abase; 500 512 ··· 521 533 int sisfb_nocrt2rate; 522 534 523 535 u32 heapstart; /* offset */ 524 - SIS_IOTYPE1 *sisfb_heap_start; /* address */ 525 - SIS_IOTYPE1 *sisfb_heap_end; /* address */ 536 + void __iomem *sisfb_heap_start; /* address */ 537 + void __iomem *sisfb_heap_end; /* address */ 526 538 u32 sisfb_heap_size; 527 539 int havenoheap; 528 540 ··· 600 612 u8 detectedpdca; 601 613 u8 detectedlcda; 602 614 603 - SIS_IOTYPE1 *hwcursor_vbase; 615 + void __iomem *hwcursor_vbase; 604 616 605 617 int chronteltype; 606 618 int tvxpos, tvypos;
-1
drivers/video/sis/sis_accel.c
··· 28 28 * for more information and updates) 29 29 */ 30 30 31 - #include <linux/version.h> 32 31 #include <linux/module.h> 33 32 #include <linux/kernel.h> 34 33 #include <linux/fb.h>
+10 -34
drivers/video/sis/sis_main.c
··· 33 33 * 34 34 */ 35 35 36 - #include <linux/version.h> 37 36 #include <linux/module.h> 38 37 #include <linux/moduleparam.h> 39 38 #include <linux/kernel.h> ··· 40 41 #include <linux/errno.h> 41 42 #include <linux/string.h> 42 43 #include <linux/mm.h> 43 - 44 - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) 45 - #include <linux/tty.h> 46 - #else 47 44 #include <linux/screen_info.h> 48 - #endif 49 - 50 45 #include <linux/slab.h> 51 46 #include <linux/fb.h> 52 47 #include <linux/selection.h> ··· 1160 1167 unsigned short modeno = ivideo->mode_no; 1161 1168 1162 1169 /* >=2.6.12's fbcon clears the screen anyway */ 1163 - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12) 1164 - if(!clrscrn) modeno |= 0x80; 1165 - #else 1166 1170 modeno |= 0x80; 1167 - #endif 1168 1171 1169 1172 outSISIDXREG(SISSR, IND_SIS_PASSWORD, SIS_PASSWORD); 1170 1173 ··· 1425 1436 if((err = sisfb_do_set_var(&info->var, 1, info))) 1426 1437 return err; 1427 1438 1428 - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) 1429 - sisfb_get_fix(&info->fix, info->currcon, info); 1430 - #else 1431 1439 sisfb_get_fix(&info->fix, -1, info); 1432 - #endif 1440 + 1433 1441 return 0; 1434 1442 } 1435 1443 ··· 1662 1676 1663 1677 /* ----------- FBDev related routines for all series ---------- */ 1664 1678 1665 - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) 1666 1679 static int sisfb_ioctl(struct fb_info *info, unsigned int cmd, 1667 1680 unsigned long arg) 1668 - #else 1669 - static int sisfb_ioctl(struct inode *inode, struct file *file, 1670 - unsigned int cmd, unsigned long arg, 1671 - struct fb_info *info) 1672 - #endif 1673 1681 { 1674 1682 struct sis_video_info *ivideo = (struct sis_video_info *)info->par; 1675 1683 struct sis_memreq sismemreq; ··· 3966 3986 } 3967 3987 3968 3988 #ifndef MODULE 3969 - SISINITSTATIC int __init 3970 - sisfb_setup(char *options) 3989 + static int __init sisfb_setup(char *options) 3971 3990 { 3972 3991 char *this_opt; 3973 3992 ··· 4065 4086 #endif 4066 4087 4067 4088 static int __devinit 4068 - sisfb_check_rom(SIS_IOTYPE1 *rom_base, struct sis_video_info *ivideo) 4089 + sisfb_check_rom(void __iomem *rom_base, struct sis_video_info *ivideo) 4069 4090 { 4070 - SIS_IOTYPE1 *rom; 4091 + void __iomem *rom; 4071 4092 int romptr; 4072 4093 4073 4094 if((readb(rom_base) != 0x55) || (readb(rom_base + 1) != 0xaa)) ··· 4096 4117 sisfb_find_rom(struct pci_dev *pdev) 4097 4118 { 4098 4119 struct sis_video_info *ivideo = pci_get_drvdata(pdev); 4099 - SIS_IOTYPE1 *rom_base; 4120 + void __iomem *rom_base; 4100 4121 unsigned char *myrombase = NULL; 4101 4122 u32 temp; 4102 - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) 4103 4123 size_t romsize; 4104 4124 4105 4125 /* First, try the official pci ROM functions (except ··· 4129 4151 } 4130 4152 4131 4153 if(myrombase) return myrombase; 4132 - #endif 4133 4154 4134 4155 /* Otherwise do it the conventional way. */ 4135 4156 ··· 4202 4225 static int __devinit 4203 4226 sisfb_post_300_buswidth(struct sis_video_info *ivideo) 4204 4227 { 4205 - SIS_IOTYPE1 *FBAddress = ivideo->video_vbase; 4228 + void __iomem *FBAddress = ivideo->video_vbase; 4206 4229 unsigned short temp; 4207 4230 unsigned char reg; 4208 4231 int i, j; ··· 4250 4273 int PseudoRankCapacity, int PseudoAdrPinCount, 4251 4274 unsigned int mapsize) 4252 4275 { 4253 - SIS_IOTYPE1 *FBAddr = ivideo->video_vbase; 4276 + void __iomem *FBAddr = ivideo->video_vbase; 4254 4277 unsigned short sr14; 4255 4278 unsigned int k, RankCapacity, PageCapacity, BankNumHigh, BankNumMid; 4256 4279 unsigned int PhysicalAdrOtherPage, PhysicalAdrHigh, PhysicalAdrHalfPage; ··· 5806 5829 ivideo->engineok = 0; 5807 5830 5808 5831 ivideo->sisfb_was_boot_device = 0; 5809 - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) 5832 + 5810 5833 if(pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW) { 5811 5834 if(ivideo->sisvga_enabled) 5812 5835 ivideo->sisfb_was_boot_device = 1; ··· 5817 5840 "as the primary VGA device\n"); 5818 5841 } 5819 5842 } 5820 - #endif 5821 5843 5822 5844 ivideo->sisfb_parm_mem = sisfb_parm_mem; 5823 5845 ivideo->sisfb_accel = sisfb_accel; ··· 5986 6010 ivideo->modeprechange = reg & 0x7f; 5987 6011 } else if(ivideo->sisvga_enabled) { 5988 6012 #if defined(__i386__) || defined(__x86_64__) 5989 - unsigned char SIS_IOTYPE2 *tt = ioremap(0x400, 0x100); 6013 + unsigned char __iomem *tt = ioremap(0x400, 0x100); 5990 6014 if(tt) { 5991 6015 ivideo->modeprechange = readb(tt + 0x49); 5992 6016 iounmap(tt); ··· 6479 6503 .remove = __devexit_p(sisfb_remove) 6480 6504 }; 6481 6505 6482 - SISINITSTATIC int __init sisfb_init(void) 6506 + static int __init sisfb_init(void) 6483 6507 { 6484 6508 #ifndef MODULE 6485 6509 char *options = NULL;
+2 -2
drivers/video/sis/sis_main.h
··· 665 665 666 666 /* Interface used by the world */ 667 667 #ifndef MODULE 668 - SISINITSTATIC int sisfb_setup(char *options); 668 + static int sisfb_setup(char *options); 669 669 #endif 670 670 671 671 /* Interface to the low level console driver */ 672 - SISINITSTATIC int sisfb_init(void); 672 + static int sisfb_init(void); 673 673 674 674 /* fbdev routines */ 675 675 static int sisfb_get_fix(struct fb_fix_screeninfo *fix, int con,
-4
drivers/video/sis/vgatypes.h
··· 53 53 #ifndef _VGATYPES_H_ 54 54 #define _VGATYPES_H_ 55 55 56 - #ifdef SIS_LINUX_KERNEL 57 - #include <linux/version.h> 58 - #endif 59 - 60 56 #define SISIOMEMTYPE 61 57 62 58 #ifdef SIS_LINUX_KERNEL