2004-09-29 19:57:28

by Hanna Linder

[permalink] [raw]
Subject: [PATCH 2.6.9-rc2-mm4 alim15x3.c] [3/8] Replace pci_find_device with pci_dev_present


The dev returned from pci_find_device was not used so it can be replaced
with pci_dev_present. Has been compile tested.

Hanna Linder
IBM Linux Technology Center

Signed-off-by: Hanna Linder <[email protected]>

diff -Nrup linux-2.6.9-rc2-mm4cln/drivers/ide/pci/alim15x3.c linux-2.6.9-rc2-mm4-patch2/drivers/ide/pci/alim15x3.c
--- linux-2.6.9-rc2-mm4cln/drivers/ide/pci/alim15x3.c 2004-09-28 14:58:26.000000000 -0700
+++ linux-2.6.9-rc2-mm4-patch2/drivers/ide/pci/alim15x3.c 2004-09-29 12:43:49.472236824 -0700
@@ -874,9 +874,14 @@ static ide_pci_device_t ali15x3_chipset

static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ static struct pci_device_id ati_rs100[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100) },
+ { },
+ };
+
ide_pci_device_t *d = &ali15x3_chipset;

- if(pci_find_device(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, NULL))
+ if(pci_dev_present(ati_rs100))
printk(KERN_ERR "Warning: ATI Radeon IGP Northbridge is not yet fully tested.\n");

#if defined(CONFIG_SPARC64)


2004-09-29 22:18:40

by Alan

[permalink] [raw]
Subject: Re: [PATCH 2.6.9-rc2-mm4 alim15x3.c] [3/8] Replace pci_find_device with pci_dev_present

On Mer, 2004-09-29 at 20:58, Hanna Linder wrote:
> The dev returned from pci_find_device was not used so it can be replaced
> with pci_dev_present. Has been compile tested.

Maybe that test should just go. Its been getting tested since 2.4.20 or
so 8)