[PATCH] ISDN: Change pci_find_device() calls to pci_get_device()

Previous thread: Problem: LTP linkat01 test fails on nfs directory (NFS v3) by Vitaliy Gusev on Friday, September 21, 2007 - 5:13 am. (3 messages)

Next thread: Re: [PATCH] kernel/printk.c: Concerns about the console handover by Bodo Eggert on Friday, September 21, 2007 - 5:24 am. (1 message)
To: <kkeil@...>
Cc: <linux-kernel@...>
Date: Friday, September 21, 2007 - 4:55 am

The following patch removes the obsolete pci_find_device() calls and replaces them with pci_get_device() for all ISDN drivers.

Compilation is fine but I haven't tested it since I don't own a ISDN card. Should be fine since the return value and parameters of pci_find_device() and pci_get_device() are the same.

The is my first patch so be nice to me :)

I hope it's not too long, I can split it if you prefer.

Signed-off-by: Gregory 'GaLi' Cavelier <gali@cleia.org>

diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c
index 28e2667..b04a178 100644
--- a/drivers/isdn/hisax/avm_pci.c
+++ b/drivers/isdn/hisax/avm_pci.c
@@ -789,7 +789,7 @@ setup_avm_pcipnp(struct IsdnCard *card)
}
#endif
#ifdef CONFIG_PCI
- if ((dev_avm = pci_get_device(PCI_VENDOR_ID_AVM,
+ if ((dev_avm = pci_find_device(PCI_VENDOR_ID_AVM,
PCI_DEVICE_ID_AVM_A1, dev_avm))) {
if (pci_enable_device(dev_avm))
return(0);
diff --git a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c
index b5e761d..3d1bdc8 100644
--- a/drivers/isdn/hisax/bkm_a4t.c
+++ b/drivers/isdn/hisax/bkm_a4t.c
@@ -340,7 +340,7 @@ setup_bkm_a4t(struct IsdnCard *card)
} else
return (0);

- while ((dev_a4t = pci_get_device(PCI_VENDOR_ID_ZORAN,
+ while ((dev_a4t = pci_find_device(PCI_VENDOR_ID_ZORAN,
PCI_DEVICE_ID_ZORAN_36120, dev_a4t))) {
ret = a4t_pci_probe(dev_a4t, cs, &found, &pci_memaddr);
if (!ret)
diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c
index 340313f..6339bb4 100644
--- a/drivers/isdn/hisax/bkm_a8.c
+++ b/drivers/isdn/hisax/bkm_a8.c
@@ -309,7 +309,7 @@ setup_sct_quadro(struct IsdnCard *card)
(sub_vendor_id != PCI_VENDOR_ID_BERKOM)))
return (0);
if (cs->subtyp == SCT_1) {
- while ((dev_a8 = pci_get_device(PCI_VENDOR_ID_PLX,
+ while ...

To: Gregory 'GaLi' Cavelier <gali@...>
Cc: <kkeil@...>, <linux-kernel@...>
Date: Friday, September 21, 2007 - 6:01 am

Hi Gregory.

Jeff Garzik has been doing a lot of work lately on the ISDN subsystem.
So please check his work to avoid doing the same work twice.

Of benefit for everyone would be a throughfull review of the changes
Jeff made. It is a nice learning expericen if not anything else.

You can find the ISDN change in one of the branches in Jeff's
public treee's at git.kernel.org.
Try also to seach the lkml archives for his work.

All that said I have not chacked if he addressed this specific cleanup.

Sam
-

To: Gregory 'GaLi' Cavelier <gali@...>
Cc: <kkeil@...>, <linux-kernel@...>
Date: Friday, September 21, 2007 - 5:22 am

I'll try to be nice:-)
Kindly check the linux kernel archives before you start of with any
patches in the kernel.

-surya.
-

To: Gregory 'GaLi' Cavelier <gali@...>
Cc: <kkeil@...>, <linux-kernel@...>
Date: Friday, September 21, 2007 - 5:44 am

No, it does not. It replaces the correct pci_get_device() calls in the
isdn tree with the obsolete pci_find_device(). ;-)

regards,

Andre
-

To: Andre Haupt <andre@...>
Cc: <kkeil@...>, <linux-kernel@...>
Date: Friday, September 21, 2007 - 5:56 am

Wow, how stupid am i ?!?

Did 'git-diff gali master' instead of 'git-diff master gali'

Anyway, going out slapping myself, sorry for the noise...

On Fri, 21 Sep 2007 11:44:22 +0200

--
Gregory 'GaLi' Cavelier
_
ASCII ribbon campaign ( )
- against HTML email X
& vCards / \
-

Previous thread: Problem: LTP linkat01 test fails on nfs directory (NFS v3) by Vitaliy Gusev on Friday, September 21, 2007 - 5:13 am. (3 messages)

Next thread: Re: [PATCH] kernel/printk.c: Concerns about the console handover by Bodo Eggert on Friday, September 21, 2007 - 5:24 am. (1 message)