patch-2.4.0-test9 linux/drivers/video/sisfb.c

Next file: linux/drivers/video/valkyriefb.c
Previous file: linux/drivers/video/sa1100fb.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test8/linux/drivers/video/sisfb.c linux/drivers/video/sisfb.c
@@ -356,8 +356,6 @@
 	0x0B, 0x0C, 0x0D, 0x0F, 0x10
 };
 
-#ifdef CONFIG_FB_SIS_LINUXBIOS
-
 #define Monitor1Sense 0x20
 
 unsigned char SRegsInit[] = { 
@@ -371,6 +369,8 @@
 	0x8e, 0x40, 0x00, 0x00, 0x08, 0x00, 0xff, 0xff
 };
 
+#ifdef CONFIG_FB_SIS_LINUXBIOS
+
 unsigned char SRegs[] = { 
  	0x03, 0x01, 0x0F, 0x00, 0x0E, 0xA1, 0x02, 0x13,
 	0x3F, 0x86, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
@@ -1440,7 +1440,6 @@
 
 static u16 get_modeID_length(unsigned long ROMAddr, u16 ModeNo)
 {
-	unsigned char ModeID;
 	u16 modeidlength;
 	u16 usModeIDOffset;
 	unsigned short PreviousWord,CurrentWord;
@@ -2804,7 +2803,6 @@
 	u16 cr30flag, cr31flag;
 	unsigned long ROMAddr = rom_vbase;
 	u16 BaseAddr = (u16) ivideo.vga_base;
-	u_short i;
 
 	P3c4 = BaseAddr + 0x14;
 	P3d4 = BaseAddr + 0x24;
@@ -3420,7 +3418,6 @@
 	struct board *b;
 	int pdev_valid = 0;
 	unsigned char jTemp;
-	u32 cmd;
 
 	outb(0x77, 0x80);
 
@@ -3448,10 +3445,8 @@
 		return -1;
 
 #ifdef CONFIG_FB_SIS_LINUXBIOS
-	pci_read_config_dword(pdev, PCI_COMMAND, &cmd);
-	cmd |= PCI_COMMAND_IO;
-	cmd |= PCI_COMMAND_MEMORY;
-	pci_write_config_dword(pdev, PCI_COMMAND, cmd); 
+	if (pci_enable_device(pdev))
+		return -EIO;
 #endif
 
 	ivideo.video_base = pci_resource_start(pdev, 0);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)