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: [PATCH 6/12] drivers/isdn/hisax/enternow_pci.c: replace pci_find_device with pci_get_device
Date: Sat, 14 Jul 2007 01:44:38 +0300 [thread overview]
Message-ID: <200707140144.39762.caglar@pardus.org.tr> (raw)
Following patch replaces pci_find_device with pci_get_device to avoid
following compiliation warning;
drivers/isdn/hisax/enternow_pci.c: In function `setup_enternow_pci':
drivers/isdn/hisax/enternow_pci.c:326: 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/enternow_pci.c | 40
++++++++++++++++++++------------------
1 file changed, 22 insertions(+), 18 deletions(-)
Index: linux-2.6/drivers/isdn/hisax/enternow_pci.c
===================================================================
--- linux-2.6.orig/drivers/isdn/hisax/enternow_pci.c
+++ linux-2.6/drivers/isdn/hisax/enternow_pci.c
@@ -315,7 +315,7 @@ setup_enternow_pci(struct IsdnCard *card
#ifdef __BIG_ENDIAN
#error "not running on big endian machines now"
#endif
- strcpy(tmp, enternow_pci_rev);
+ strcpy(tmp, enternow_pci_rev);
printk(KERN_INFO "HiSax: Formula-n Europe AG enter:now ISDN PCI driver
Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_ENTERNOW)
return(0);
@@ -323,29 +323,29 @@ setup_enternow_pci(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;
cs->irq = dev_netjet->irq;
if (!cs->irq) {
printk(KERN_WARNING "enter:now PCI: 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 "enter:now PCI: No IO-Adr for PCI card found\n");
- return(0);
+ goto dev_netjet_cleanup;
}
- /* checks Sub-Vendor ID because system crashes with
Traverse-Card */
+ /* checks Sub-Vendor ID because system crashes with Traverse-Card */
if ((dev_netjet->subsystem_vendor != 0x55) ||
(dev_netjet->subsystem_device != 0x02)) {
printk(KERN_WARNING "enter:now: You tried to load this driver with an
incompatible TigerJet-card\n");
- printk(KERN_WARNING "Use type=20 for Traverse
NetJet PCI Card.\n");
- return(0);
- }
+ printk(KERN_WARNING "Use type=20 for Traverse NetJet PCI Card.\n");
+ goto dev_netjet_cleanup;
+ }
} else {
- printk(KERN_WARNING "enter:now PCI: No PCI card
found\n");
+ printk(KERN_WARNING "enter:now PCI: No PCI card found\n");
return(0);
}
@@ -390,22 +390,26 @@ setup_enternow_pci(struct IsdnCard *card
CardType[card->typ],
cs->hw.njet.base,
cs->hw.njet.base + bytecnt);
- return (0);
+ goto dev_netjet_cleanup;
}
setup_Amd7930(cs);
cs->hw.njet.last_is0 = 0;
- /* macro rByteAMD */
- cs->readisac = &ReadByteAmd7930;
- /* macro wByteAMD */
- cs->writeisac = &WriteByteAmd7930;
- cs->dc.amd7930.setIrqMask = &enpci_setIrqMask;
+ /* macro rByteAMD */
+ cs->readisac = &ReadByteAmd7930;
+ /* macro wByteAMD */
+ cs->writeisac = &WriteByteAmd7930;
+ cs->dc.amd7930.setIrqMask = &enpci_setIrqMask;
- cs->BC_Read_Reg = &dummyrr;
+ cs->BC_Read_Reg = &dummyrr;
cs->BC_Write_Reg = &dummywr;
cs->BC_Send_Data = &netjet_fill_dma;
cs->cardmsg = &enpci_card_msg;
cs->irq_func = &enpci_interrupt;
cs->irq_flags |= IRQF_SHARED;
+ pci_dev_put(dev_netjet);
+ return (1);
- 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!
reply other threads:[~2007-07-13 22:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200707140144.39762.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox