* [PATCH 11/12] drivers/isdn/hisax/telespci.c: replace pci_find_device with pci_get_device
@ 2007-07-13 22:44 S.Çağlar Onur
0 siblings, 0 replies; only message in thread
From: S.Çağlar Onur @ 2007-07-13 22:44 UTC (permalink / raw)
To: LKML; +Cc: kkeil, kai.germaschewski, isdn4linux
Following patch replaces pci_find_device with pci_get_device to avoid
following compiliation warning;
drivers/isdn/hisax/telespci.c: In function `setup_telespci':
drivers/isdn/hisax/telespci.c:303: warning: `pci_find_device' is deprecated
(declared at include/linux/pci.h:478)
Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
---
drivers/isdn/hisax/telespci.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
Index: linux-2.6/drivers/isdn/hisax/telespci.c
===================================================================
--- linux-2.6.orig/drivers/isdn/hisax/telespci.c
+++ linux-2.6/drivers/isdn/hisax/telespci.c
@@ -300,13 +300,13 @@ setup_telespci(struct IsdnCard *card)
if (cs->typ != ISDN_CTYPE_TELESPCI)
return (0);
#ifdef CONFIG_PCI
- if ((dev_tel = pci_find_device (PCI_VENDOR_ID_ZORAN,
PCI_DEVICE_ID_ZORAN_36120, dev_tel))) {
+ if ((dev_tel = pci_get_device (PCI_VENDOR_ID_ZORAN,
PCI_DEVICE_ID_ZORAN_36120, dev_tel))) {
if (pci_enable_device(dev_tel))
- return(0);
+ goto dev_tel_cleanup;
cs->irq = dev_tel->irq;
if (!cs->irq) {
printk(KERN_WARNING "Teles: No IRQ for PCI card found\n");
- return(0);
+ goto dev_tel_cleanup;
}
cs->hw.teles0.membase = ioremap(pci_resource_start(dev_tel, 0),
PAGE_SIZE);
@@ -353,7 +353,13 @@ setup_telespci(struct IsdnCard *card)
printk(KERN_WARNING
"TelesPCI: wrong HSCX versions check IO/MEM addresses\n");
release_io_telespci(cs);
- return (0);
+ goto dev_tel_cleanup;
}
+ pci_dev_put(dev_tel);
return (1);
+
+dev_tel_cleanup:
+ pci_dev_put(dev_tel);
+ return (0);
+
}
--
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/
Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-13 22:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-13 22:44 [PATCH 11/12] drivers/isdn/hisax/telespci.c: replace pci_find_device with pci_get_device S.Çağlar Onur
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox