Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41a68a74 authored by Tilman Schmidt's avatar Tilman Schmidt Committed by Jesse Barnes
Browse files

PCI: push deprecated pci_find_device() function to last user



The ISDN4Linux HiSax driver family contains the last remaining users
of the deprecated pci_find_device() function. This patch creates a
private copy of that function in HiSax, and removes the now unused
global function together with its controlling configuration option,
CONFIG_PCI_LEGACY.

Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 7c9342b8
Loading
Loading
Loading
Loading
+9 −9
Original line number Original line Diff line number Diff line
@@ -109,7 +109,7 @@ config HISAX_16_3


config HISAX_TELESPCI
config HISAX_TELESPCI
	bool "Teles PCI"
	bool "Teles PCI"
	depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
	depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
	help
	help
	  This enables HiSax support for the Teles PCI.
	  This enables HiSax support for the Teles PCI.
	  See <file:Documentation/isdn/README.HiSax> on how to configure it.
	  See <file:Documentation/isdn/README.HiSax> on how to configure it.
@@ -237,7 +237,7 @@ config HISAX_MIC


config HISAX_NETJET
config HISAX_NETJET
	bool "NETjet card"
	bool "NETjet card"
	depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
	depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
	help
	help
	  This enables HiSax support for the NetJet from Traverse
	  This enables HiSax support for the NetJet from Traverse
	  Technologies.
	  Technologies.
@@ -248,7 +248,7 @@ config HISAX_NETJET


config HISAX_NETJET_U
config HISAX_NETJET_U
	bool "NETspider U card"
	bool "NETspider U card"
	depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
	depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
	help
	help
	  This enables HiSax support for the Netspider U interface ISDN card
	  This enables HiSax support for the Netspider U interface ISDN card
	  from Traverse Technologies.
	  from Traverse Technologies.
@@ -287,7 +287,7 @@ config HISAX_HSTSAPHIR


config HISAX_BKM_A4T
config HISAX_BKM_A4T
	bool "Telekom A4T card"
	bool "Telekom A4T card"
	depends on PCI && PCI_LEGACY
	depends on PCI
	help
	help
	  This enables HiSax support for the Telekom A4T card.
	  This enables HiSax support for the Telekom A4T card.


@@ -297,7 +297,7 @@ config HISAX_BKM_A4T


config HISAX_SCT_QUADRO
config HISAX_SCT_QUADRO
	bool "Scitel Quadro card"
	bool "Scitel Quadro card"
	depends on PCI && PCI_LEGACY
	depends on PCI
	help
	help
	  This enables HiSax support for the Scitel Quadro card.
	  This enables HiSax support for the Scitel Quadro card.


@@ -316,7 +316,7 @@ config HISAX_GAZEL


config HISAX_HFC_PCI
config HISAX_HFC_PCI
	bool "HFC PCI-Bus cards"
	bool "HFC PCI-Bus cards"
	depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
	depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
	help
	help
	  This enables HiSax support for the HFC-S PCI 2BDS0 based cards.
	  This enables HiSax support for the HFC-S PCI 2BDS0 based cards.


@@ -325,7 +325,7 @@ config HISAX_HFC_PCI


config HISAX_W6692
config HISAX_W6692
	bool "Winbond W6692 based cards"
	bool "Winbond W6692 based cards"
	depends on PCI && PCI_LEGACY
	depends on PCI
	help
	help
	  This enables HiSax support for Winbond W6692 based PCI ISDN cards.
	  This enables HiSax support for Winbond W6692 based PCI ISDN cards.


@@ -341,7 +341,7 @@ config HISAX_HFC_SX


config HISAX_ENTERNOW_PCI
config HISAX_ENTERNOW_PCI
	bool "Formula-n enter:now PCI card"
	bool "Formula-n enter:now PCI card"
	depends on HISAX_NETJET && PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
	depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV))
	help
	help
	  This enables HiSax support for the Formula-n enter:now PCI
	  This enables HiSax support for the Formula-n enter:now PCI
	  ISDN card.
	  ISDN card.
@@ -412,7 +412,7 @@ config HISAX_HFC4S8S


config HISAX_FRITZ_PCIPNP
config HISAX_FRITZ_PCIPNP
	tristate "AVM Fritz!Card PCI/PCIv2/PnP support (EXPERIMENTAL)"
	tristate "AVM Fritz!Card PCI/PCIv2/PnP support (EXPERIMENTAL)"
	depends on PCI && PCI_LEGACY && EXPERIMENTAL
	depends on PCI && EXPERIMENTAL
	help
	help
	  This enables the driver for the AVM Fritz!Card PCI,
	  This enables the driver for the AVM Fritz!Card PCI,
	  Fritz!Card PCI v2 and Fritz!Card PnP.
	  Fritz!Card PCI v2 and Fritz!Card PnP.
+3 −3
Original line number Original line Diff line number Diff line
@@ -822,7 +822,7 @@ static int __devinit avm_pnp_setup(struct IsdnCardState *cs)


#endif /* __ISAPNP__ */
#endif /* __ISAPNP__ */


#ifndef CONFIG_PCI_LEGACY
#ifndef CONFIG_PCI


static int __devinit avm_pci_setup(struct IsdnCardState *cs)
static int __devinit avm_pci_setup(struct IsdnCardState *cs)
{
{
@@ -835,7 +835,7 @@ static struct pci_dev *dev_avm __devinitdata = NULL;


static int __devinit avm_pci_setup(struct IsdnCardState *cs)
static int __devinit avm_pci_setup(struct IsdnCardState *cs)
{
{
	if ((dev_avm = pci_find_device(PCI_VENDOR_ID_AVM,
	if ((dev_avm = hisax_find_pci_device(PCI_VENDOR_ID_AVM,
		PCI_DEVICE_ID_AVM_A1, dev_avm))) {
		PCI_DEVICE_ID_AVM_A1, dev_avm))) {


		if (pci_enable_device(dev_avm))
		if (pci_enable_device(dev_avm))
@@ -864,7 +864,7 @@ static int __devinit avm_pci_setup(struct IsdnCardState *cs)
	return (1);
	return (1);
}
}


#endif /* CONFIG_PCI_LEGACY */
#endif /* CONFIG_PCI */


int __devinit
int __devinit
setup_avm_pcipnp(struct IsdnCard *card)
setup_avm_pcipnp(struct IsdnCard *card)
+1 −1
Original line number Original line Diff line number Diff line
@@ -340,7 +340,7 @@ setup_bkm_a4t(struct IsdnCard *card)
	} else
	} else
		return (0);
		return (0);


	while ((dev_a4t = pci_find_device(PCI_VENDOR_ID_ZORAN,
	while ((dev_a4t = hisax_find_pci_device(PCI_VENDOR_ID_ZORAN,
		PCI_DEVICE_ID_ZORAN_36120, dev_a4t))) {
		PCI_DEVICE_ID_ZORAN_36120, dev_a4t))) {
		ret = a4t_pci_probe(dev_a4t, cs, &found, &pci_memaddr);
		ret = a4t_pci_probe(dev_a4t, cs, &found, &pci_memaddr);
		if (!ret)
		if (!ret)
+1 −1
Original line number Original line Diff line number Diff line
@@ -301,7 +301,7 @@ setup_sct_quadro(struct IsdnCard *card)
		(sub_vendor_id != PCI_VENDOR_ID_BERKOM)))
		(sub_vendor_id != PCI_VENDOR_ID_BERKOM)))
		return (0);
		return (0);
	if (cs->subtyp == SCT_1) {
	if (cs->subtyp == SCT_1) {
		while ((dev_a8 = pci_find_device(PCI_VENDOR_ID_PLX,
		while ((dev_a8 = hisax_find_pci_device(PCI_VENDOR_ID_PLX,
			PCI_DEVICE_ID_PLX_9050, dev_a8))) {
			PCI_DEVICE_ID_PLX_9050, dev_a8))) {
			
			
			sub_vendor_id = dev_a8->subsystem_vendor;
			sub_vendor_id = dev_a8->subsystem_vendor;
+7 −7
Original line number Original line Diff line number Diff line
@@ -1148,7 +1148,7 @@ static int __devinit setup_diva_isapnp(struct IsdnCard *card)


#endif	/* ISAPNP */
#endif	/* ISAPNP */


#ifdef CONFIG_PCI_LEGACY
#ifdef CONFIG_PCI
static struct pci_dev *dev_diva __devinitdata = NULL;
static struct pci_dev *dev_diva __devinitdata = NULL;
static struct pci_dev *dev_diva_u __devinitdata = NULL;
static struct pci_dev *dev_diva_u __devinitdata = NULL;
static struct pci_dev *dev_diva201 __devinitdata = NULL;
static struct pci_dev *dev_diva201 __devinitdata = NULL;
@@ -1159,21 +1159,21 @@ static int __devinit setup_diva_pci(struct IsdnCard *card)
	struct IsdnCardState *cs = card->cs;
	struct IsdnCardState *cs = card->cs;


	cs->subtyp = 0;
	cs->subtyp = 0;
	if ((dev_diva = pci_find_device(PCI_VENDOR_ID_EICON,
	if ((dev_diva = hisax_find_pci_device(PCI_VENDOR_ID_EICON,
		PCI_DEVICE_ID_EICON_DIVA20, dev_diva))) {
		PCI_DEVICE_ID_EICON_DIVA20, dev_diva))) {
		if (pci_enable_device(dev_diva))
		if (pci_enable_device(dev_diva))
			return(0);
			return(0);
		cs->subtyp = DIVA_PCI;
		cs->subtyp = DIVA_PCI;
		cs->irq = dev_diva->irq;
		cs->irq = dev_diva->irq;
		cs->hw.diva.cfg_reg = pci_resource_start(dev_diva, 2);
		cs->hw.diva.cfg_reg = pci_resource_start(dev_diva, 2);
	} else if ((dev_diva_u = pci_find_device(PCI_VENDOR_ID_EICON,
	} else if ((dev_diva_u = hisax_find_pci_device(PCI_VENDOR_ID_EICON,
		PCI_DEVICE_ID_EICON_DIVA20_U, dev_diva_u))) {
		PCI_DEVICE_ID_EICON_DIVA20_U, dev_diva_u))) {
		if (pci_enable_device(dev_diva_u))
		if (pci_enable_device(dev_diva_u))
			return(0);
			return(0);
		cs->subtyp = DIVA_PCI;
		cs->subtyp = DIVA_PCI;
		cs->irq = dev_diva_u->irq;
		cs->irq = dev_diva_u->irq;
		cs->hw.diva.cfg_reg = pci_resource_start(dev_diva_u, 2);
		cs->hw.diva.cfg_reg = pci_resource_start(dev_diva_u, 2);
	} else if ((dev_diva201 = pci_find_device(PCI_VENDOR_ID_EICON,
	} else if ((dev_diva201 = hisax_find_pci_device(PCI_VENDOR_ID_EICON,
		PCI_DEVICE_ID_EICON_DIVA201, dev_diva201))) {
		PCI_DEVICE_ID_EICON_DIVA201, dev_diva201))) {
		if (pci_enable_device(dev_diva201))
		if (pci_enable_device(dev_diva201))
			return(0);
			return(0);
@@ -1183,7 +1183,7 @@ static int __devinit setup_diva_pci(struct IsdnCard *card)
			(ulong) ioremap(pci_resource_start(dev_diva201, 0), 4096);
			(ulong) ioremap(pci_resource_start(dev_diva201, 0), 4096);
		cs->hw.diva.cfg_reg =
		cs->hw.diva.cfg_reg =
			(ulong) ioremap(pci_resource_start(dev_diva201, 1), 4096);
			(ulong) ioremap(pci_resource_start(dev_diva201, 1), 4096);
	} else if ((dev_diva202 = pci_find_device(PCI_VENDOR_ID_EICON,
	} else if ((dev_diva202 = hisax_find_pci_device(PCI_VENDOR_ID_EICON,
		PCI_DEVICE_ID_EICON_DIVA202, dev_diva202))) {
		PCI_DEVICE_ID_EICON_DIVA202, dev_diva202))) {
		if (pci_enable_device(dev_diva202))
		if (pci_enable_device(dev_diva202))
			return(0);
			return(0);
@@ -1229,14 +1229,14 @@ static int __devinit setup_diva_pci(struct IsdnCard *card)
	return (1);		/* card found */
	return (1);		/* card found */
}
}


#else	/* if !CONFIG_PCI_LEGACY */
#else	/* if !CONFIG_PCI */


static int __devinit setup_diva_pci(struct IsdnCard *card)
static int __devinit setup_diva_pci(struct IsdnCard *card)
{
{
	return (-1);	/* card not found; continue search */
	return (-1);	/* card not found; continue search */
}
}


#endif	/* CONFIG_PCI_LEGACY */
#endif	/* CONFIG_PCI */


int __devinit
int __devinit
setup_diva(struct IsdnCard *card)
setup_diva(struct IsdnCard *card)
Loading