patch-2.3.27 linux/drivers/isdn/hisax/telespci.c

Next file: linux/drivers/isdn/hisax/w6692.c
Previous file: linux/drivers/isdn/hisax/teles3.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.26/linux/drivers/isdn/hisax/telespci.c linux/drivers/isdn/hisax/telespci.c
@@ -42,9 +42,6 @@
 #include "hscx.h"
 #include "isdnl1.h"
 #include <linux/pci.h>
-#ifndef COMPAT_HAS_NEW_PCI
-#include <linux/bios32.h>
-#endif
 
 extern const char *CardType[];
 const char *telespci_revision = "$Revision: 2.9 $";
@@ -304,29 +301,19 @@
 	return(0);
 }
 
-#ifdef COMPAT_HAS_NEW_PCI
 static 	struct pci_dev *dev_tel __initdata = NULL;
-#else
-static 	int pci_index __initdata = 0;
-#endif
 
-int __init
-setup_telespci(struct IsdnCard *card)
+__initfunc(int
+setup_telespci(struct IsdnCard *card))
 {
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
-#ifndef COMPAT_HAS_NEW_PCI
-	u_char pci_bus, pci_device_fn, pci_irq;
-	u_int pci_memaddr;
-	u_char found = 0;
-#endif
 
 	strcpy(tmp, telespci_revision);
 	printk(KERN_INFO "HiSax: Teles/PCI driver Rev. %s\n", HiSax_getrev(tmp));
 	if (cs->typ != ISDN_CTYPE_TELESPCI)
 		return (0);
 #if CONFIG_PCI
-#ifdef COMPAT_HAS_NEW_PCI
 	if (!pci_present()) {
 		printk(KERN_ERR "TelesPCI: no PCI bus present\n");
 		return(0);
@@ -337,40 +324,14 @@
 			printk(KERN_WARNING "Teles: No IRQ for PCI card found\n");
 			return(0);
 		}
-		cs->hw.teles0.membase = (u_int) ioremap(get_pcibase(dev_tel, 0),
+		cs->hw.teles0.membase = (u_int) ioremap(dev_tel->resource[ 0].start,
 			PAGE_SIZE);
 		printk(KERN_INFO "Found: Zoran, base-address: 0x%lx, irq: 0x%x\n",
-			get_pcibase(dev_tel, 0), dev_tel->irq);
+			dev_tel->resource[ 0].start, dev_tel->irq);
 	} else {
 		printk(KERN_WARNING "TelesPCI: No PCI card found\n");
 		return(0);
 	}
-#else
-	for (; pci_index < 0xff; pci_index++) {
-		if (pcibios_find_device (0x11DE, 0x6120,
-			pci_index, &pci_bus, &pci_device_fn)
-			== PCIBIOS_SUCCESSFUL) {
-			found = 1;
-		} else {
-			break;
-		}
-		pcibios_read_config_dword(pci_bus, pci_device_fn,
-				PCI_BASE_ADDRESS_0, &pci_memaddr);
-		pcibios_read_config_byte(pci_bus, pci_device_fn,
-				PCI_INTERRUPT_LINE, &pci_irq);
-
-		printk(KERN_INFO "Found: Zoran, base-address: 0x%x,"
-			" irq: 0x%x\n", pci_memaddr, pci_irq);
-		break;
-	}
-	if (!found) {
-		printk(KERN_WARNING "TelesPCI: No PCI card found\n");
-		return(0);
-	}
-	pci_index++;
-	cs->irq = pci_irq;
-	cs->hw.teles0.membase = (u_int) vremap(pci_memaddr, PAGE_SIZE);
-#endif /* COMPAT_HAS_NEW_PCI */
 #else
 	printk(KERN_WARNING "HiSax: Teles/PCI and NO_PCI_BIOS\n");
 	printk(KERN_WARNING "HiSax: Teles/PCI unable to config\n");

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