Re: [PATCH] Yet more PCI fixes for 2.5.70

Greg KH
2003-06-10T21:36:44Z

ChangeSet 1.1340, 2003/06/09 15:50:31-07:00, greg@kroah.com

PCI: remove pci_present() from drivers/net/saa9730.c

drivers/net/saa9730.c | 39 +++++++++++++++++++--------------------
1 files changed, 19 insertions(+), 20 deletions(-)

diff -Nru a/drivers/net/saa9730.c b/drivers/net/saa9730.c
--- a/drivers/net/saa9730.c Tue Jun 10 11:20:50 2003
+++ b/drivers/net/saa9730.c Tue Jun 10 11:20:50 2003
@@ -1050,31 +1050,30 @@
static int __init saa9730_probe(void)
{
struct net_device *dev = NULL;
+ struct pci_dev *pdev = NULL;

- if (pci_present()) {
- struct pci_dev *pdev = NULL;
- if (lan_saa9730_debug > 1)
- printk
- ("saa9730.c: PCI bios is present, checking for devices...\n");
+ if (lan_saa9730_debug > 1)
+ printk
+ ("saa9730.c: PCI bios is present, checking for devices...\n");

- while ((pdev = pci_find_device(PCI_VENDOR_ID_PHILIPS,
- PCI_DEVICE_ID_PHILIPS_SAA9730,
- pdev))) {
- unsigned int pci_ioaddr;
+ while ((pdev = pci_find_device(PCI_VENDOR_ID_PHILIPS,
+ PCI_DEVICE_ID_PHILIPS_SAA9730,
+ pdev))) {
+ unsigned int pci_ioaddr;

- pci_irq_line = pdev->irq;
- /* LAN base address in located at BAR 1. */
+ pci_irq_line = pdev->irq;
+ /* LAN base address in located at BAR 1. */

- pci_ioaddr = pci_resource_start(pdev, 1);
- pci_set_master(pdev);
+ pci_ioaddr = pci_resource_start(pdev, 1);
+ pci_set_master(pdev);

- printk("Found SAA9730 (PCI) at %#x, irq %d.\n",
- pci_ioaddr, pci_irq_line);
- if (!lan_saa9730_init
- (dev, pci_ioaddr, pci_irq_line)) return 0;
- else
- printk("Lan init failed.\n");
- }
+ printk("Found SAA9730 (PCI) at %#x, irq %d.\n",
+ pci_ioaddr, pci_irq_line);
+ if (!lan_saa9730_init
+ (dev, pci_ioaddr, pci_irq_line))
+ return 0;
+ else
+ printk("Lan init failed.\n");
}

return -ENODEV;