As pci_find_device is going away I've replaced it with pci_get_device.
If someone with a Sparc64 system could test it I would appreciate it.
Thanks.
Hanna Linder
IBM Linux Technology Center
Signed-off-by: Hanna Linder <[email protected]>
---
diff -Nrup linux-2.6.9-rc3-mm3cln/arch/sparc64/kernel/ebus.c linux-2.6.9-rc3-mm3patch2/arch/sparc64/kernel/ebus.c
--- linux-2.6.9-rc3-mm3cln/arch/sparc64/kernel/ebus.c 2004-09-29 20:04:25.000000000 -0700
+++ linux-2.6.9-rc3-mm3patch2/arch/sparc64/kernel/ebus.c 2004-10-08 15:37:52.333561336 -0700
@@ -528,7 +528,7 @@ static struct pci_dev *find_next_ebus(st
struct pci_dev *pdev = start;
do {
- pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
+ pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
if (pdev &&
(pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS))
On Fri, 2004-10-08 at 15:53, Hanna Linder wrote:
> @@ -528,7 +528,7 @@ static struct pci_dev *find_next_ebus(st
> struct pci_dev *pdev = start;
>
> do {
> - pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
> + pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
> if (pdev &&
> (pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
> pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS))
ebus_init() needs pci_put_dev(pdev) cleanup.
-scott
--On Saturday, October 09, 2004 10:21:15 AM -0700 Scott Feldman <[email protected]> wrote:
> On Fri, 2004-10-08 at 15:53, Hanna Linder wrote:
>> @@ -528,7 +528,7 @@ static struct pci_dev *find_next_ebus(st
>> struct pci_dev *pdev = start;
>>
>> do {
>> - pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
>> + pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
>> if (pdev &&
>> (pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
>> pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS))
>
> ebus_init() needs pci_put_dev(pdev) cleanup.
>
> -scott
>
>
This is in a while loop with the pdev in the from* position. The dereference is
done automattically.
Thanks.
Hanna