From: "S.Çağlar Onur" <caglar@pardus.org.tr>
To: LKML <linux-kernel@vger.kernel.org>
Cc: kkeil@suse.de, kai.germaschewski@gmx.de,
isdn4linux@listserv.isdn4linux.de
Subject: Re: [PATCH 8/12] drivers/isdn/hisax/nj_s.c: replace pci_find_device with pci_get_device
Date: Sat, 14 Jul 2007 02:02:57 +0300 [thread overview]
Message-ID: <200707140202.58800.caglar@pardus.org.tr> (raw)
In-Reply-To: <200707140144.46741.caglar@pardus.org.tr>
[resend] i forget to quilt refresh :(, sorry for noise
14 Tem 2007 Cts tarihinde, S.Çağlar Onur şunları yazmıştı:
> ---
> drivers/isdn/hisax/nj_s.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_s.c: In function `setup_netjet_s':
drivers/isdn/hisax/nj_s.c:173: 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
Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
---
drivers/isdn/hisax/nj_s.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
Index: linux-2.6/drivers/isdn/hisax/nj_s.c
===================================================================
--- linux-2.6.orig/drivers/isdn/hisax/nj_s.c
+++ linux-2.6/drivers/isdn/hisax/nj_s.c
@@ -170,20 +170,20 @@ setup_netjet_s(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 "NETjet-S: 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 "NETjet-S: No IO-Adr for PCI card found\n");
- return(0);
+ goto dev_netjet_cleanup;
}
/* the TJ300 and TJ320 must be detected, the IRQ handling is different
* unfortunatly the chips use the same device ID, but the TJ320 has
@@ -199,7 +199,7 @@ setup_netjet_s(struct IsdnCard *card)
(dev_netjet->subsystem_device == 0x02)) {
printk(KERN_WARNING "Netjet: You tried to load this driver with an
incompatible TigerJet-card\n");
printk(KERN_WARNING "Use type=41 for Formula-n enter:now ISDN PCI and
compatible\n");
- return(0);
+ goto dev_netjet_cleanup;
}
/* end new code */
} else {
@@ -237,8 +237,8 @@ setup_netjet_s(struct IsdnCard *card)
default :
printk( KERN_WARNING "NETjet-S: No PCI card found\n" );
return 0;
- }
- break;
+ }
+ break;
}
#else
@@ -259,7 +259,7 @@ setup_netjet_s(struct IsdnCard *card)
CardType[card->typ],
cs->hw.njet.base,
cs->hw.njet.base + bytecnt);
- return (0);
+ goto dev_netjet_cleanup;
}
cs->readisac = &NETjet_ReadIC;
cs->writeisac = &NETjet_WriteIC;
@@ -273,5 +273,10 @@ setup_netjet_s(struct IsdnCard *card)
cs->irq_func = &netjet_s_interrupt;
cs->irq_flags |= IRQF_SHARED;
ISACVersion(cs, "NETjet-S:");
+ pci_dev_put(dev_netjet);
return (1);
+
+dev_netjet_cleanup:
+ pci_dev_put(dev_netjet);
+ 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!
prev parent reply other threads:[~2007-07-13 23:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-13 22:44 [PATCH 8/12] drivers/isdn/hisax/nj_s.c: replace pci_find_device with pci_get_device S.Çağlar Onur
2007-07-13 23:02 ` S.Çağlar Onur [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200707140202.58800.caglar@pardus.org.tr \
--to=caglar@pardus.org.tr \
--cc=isdn4linux@listserv.isdn4linux.de \
--cc=kai.germaschewski@gmx.de \
--cc=kkeil@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.