drivers/isdn/hisax/nj_u.c: replace pci_find_device with pci_get_device
PATCH 9/12 drivers/isdn/hisax/nj_u.c: replace pci_find_device with pci_get_device
Following patch replaces pci_find_device with pci_get_device to avoid following compiliation warning;
drivers/isdn/hisax/nj_u.c: In function `setup_netjet_u':drivers/isdn/hisax/nj_u.c:154: warning: `pci_find_device' is deprecated (declared at include/linux/pci.h:478)
and also removes trailing whitespaces at the ends of lines and converts smarttabs/whitespaces into real tabs
--- drivers/isdn/hisax/nj_u.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
drivers/isdn/hisax/nj_u.c +13 -8
@@ -151,20 +151,20 @@ setup_netjet_u(struct IsdnCard *card)for ( ;; ) { -if ((dev_netjet =pci_find_device (PCI_VENDOR_ID_TIGERJET , +if ((dev_netjet =pci_get_device (PCI_VENDOR_ID_TIGERJET ,PCI_DEVICE_ID_TIGERJET_300 , dev_netjet))) {if (pci_enable_device (dev_netjet)) -return (0 ); + goto dev_netjet_cleanup;pci_set_master (dev_netjet); cs->irq = dev_netjet->irq;if (!cs->irq) {printk (KERN_WARNING "NETspider-U: No IRQ for PCI card found\n" ); -return (0 ); + goto dev_netjet_cleanup; } cs->hw.njet.base =pci_resource_start (dev_netjet,0 );if (!cs->hw.njet.base) {printk (KERN_WARNING "NETspider-U: No IO-Adr for PCI card found\n" ); -return (0 ); + goto dev_netjet_cleanup; } }else {printk (KERN_WARNING "NETspider-U: No PCI card found\n" );
@@ -202,9 +202,9 @@ setup_netjet_u(struct IsdnCard *card)default :printk (KERN_WARNING "NETspider-U: No PCI card found\n" ); - return 0; - } -break ; + goto dev_netjet_cleanup; + } +break ; }#else
@@ -225,7 +225,7 @@ setup_netjet_u(struct IsdnCard *card) CardType[card->typ], cs->hw.njet.base, cs->hw.njet.base + bytecnt); -return (0 ); + goto dev_netjet_cleanup; }setup_icc (cs); cs->readisac = &NETjet_ReadIC;
@@ -239,5 +239,10 @@ setup_netjet_u(struct IsdnCard *card) cs->irq_func = &netjet_u_interrupt; cs->irq_flags |=IRQF_SHARED ;ICCVersion (cs,"NETspider-U:" ); +pci_dev_put (dev_netjet);return (1 ); + +dev_netjet_cleanup: +pci_dev_put (dev_netjet); +return (0 ); }
Signature · 4 lines
S.Çağlar Onur <[email protected]> http://cekirdek.pardus.org.tr/~caglar/ Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
[resend] i forget to quilt refresh :(, sorry for noise
14 Tem 2007 Cts tarihinde, S.Çağlar Onur şunları yazmıştı:
Quoted 3 lines
--- drivers/isdn/hisax/nj_u.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
Following patch replaces pci_find_device with pci_get_device to avoid following compiliation warning;
drivers/isdn/hisax/nj_u.c: In function `setup_netjet_u':drivers/isdn/hisax/nj_u.c:154: warning: `pci_find_device' is deprecated (declared at include/linux/pci.h:478)
and also removes trailing whitespaces at the ends of lines and converts smarttabs/whitespaces into real tabs
--- drivers/isdn/hisax/nj_u.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
drivers/isdn/hisax/nj_u.c +13 -8
@@ -151,20 +151,20 @@ setup_netjet_u(struct IsdnCard *card)for ( ;; ) { -if ((dev_netjet =pci_find_device (PCI_VENDOR_ID_TIGERJET , +if ((dev_netjet =pci_get_device (PCI_VENDOR_ID_TIGERJET ,PCI_DEVICE_ID_TIGERJET_300 , dev_netjet))) {if (pci_enable_device (dev_netjet)) -return (0 ); + goto dev_netjet_cleanup;pci_set_master (dev_netjet); cs->irq = dev_netjet->irq;if (!cs->irq) {printk (KERN_WARNING "NETspider-U: No IRQ for PCI card found\n" ); -return (0 ); + goto dev_netjet_cleanup; } cs->hw.njet.base =pci_resource_start (dev_netjet,0 );if (!cs->hw.njet.base) {printk (KERN_WARNING "NETspider-U: No IO-Adr for PCI card found\n" ); -return (0 ); + goto dev_netjet_cleanup; } }else {printk (KERN_WARNING "NETspider-U: No PCI card found\n" );
@@ -202,9 +202,9 @@ setup_netjet_u(struct IsdnCard *card)default :printk (KERN_WARNING "NETspider-U: No PCI card found\n" ); - return 0; - } -break ; + goto dev_netjet_cleanup; + } +break ; }#else
@@ -225,7 +225,7 @@ setup_netjet_u(struct IsdnCard *card) CardType[card->typ], cs->hw.njet.base, cs->hw.njet.base + bytecnt); -return (0 ); + goto dev_netjet_cleanup; }setup_icc (cs); cs->readisac = &NETjet_ReadIC;
@@ -239,5 +239,10 @@ setup_netjet_u(struct IsdnCard *card) cs->irq_func = &netjet_u_interrupt; cs->irq_flags |=IRQF_SHARED ;ICCVersion (cs,"NETspider-U:" ); +pci_dev_put (dev_netjet);return (1 ); + +dev_netjet_cleanup: +pci_dev_put (dev_netjet); +return (0 ); }
Signature · 4 lines
S.Çağlar Onur <[email protected]> http://cekirdek.pardus.org.tr/~caglar/ Linux is like living in a teepee. No Windows, no Gates and an Apache in house!