diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-12-08 05:39:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:03 -0500 |
commit | b1489009963b8c5132f2ffe23483e811d9ae5607 (patch) | |
tree | 66f8ada358e6e42dc7a65e3f7ed662d5bfc0d32a /drivers/ide/pci/pdc202xx_new.c | |
parent | 6b49a257850fb8ad91f4c76bb712e9213141a34a (diff) |
[PATCH] ide: more conversion to pci_get APIs
This completes IDE except for one use which requires a new core PCI function
and will be polished up at the end
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/pci/pdc202xx_new.c')
-rw-r--r-- | drivers/ide/pci/pdc202xx_new.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 6c097e80b4df..0592dc0f96c0 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
@@ -362,6 +362,7 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev, | |||
362 | ide_pci_device_t *d) | 362 | ide_pci_device_t *d) |
363 | { | 363 | { |
364 | struct pci_dev *findev = NULL; | 364 | struct pci_dev *findev = NULL; |
365 | int ret; | ||
365 | 366 | ||
366 | if ((dev->bus->self && | 367 | if ((dev->bus->self && |
367 | dev->bus->self->vendor == PCI_VENDOR_ID_DEC) && | 368 | dev->bus->self->vendor == PCI_VENDOR_ID_DEC) && |
@@ -369,14 +370,16 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev, | |||
369 | if (PCI_SLOT(dev->devfn) & 2) | 370 | if (PCI_SLOT(dev->devfn) & 2) |
370 | return -ENODEV; | 371 | return -ENODEV; |
371 | d->extra = 0; | 372 | d->extra = 0; |
372 | while ((findev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) { | 373 | while ((findev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) { |
373 | if ((findev->vendor == dev->vendor) && | 374 | if ((findev->vendor == dev->vendor) && |
374 | (findev->device == dev->device) && | 375 | (findev->device == dev->device) && |
375 | (PCI_SLOT(findev->devfn) & 2)) { | 376 | (PCI_SLOT(findev->devfn) & 2)) { |
376 | if (findev->irq != dev->irq) { | 377 | if (findev->irq != dev->irq) { |
377 | findev->irq = dev->irq; | 378 | findev->irq = dev->irq; |
378 | } | 379 | } |
379 | return ide_setup_pci_devices(dev, findev, d); | 380 | ret = ide_setup_pci_devices(dev, findev, d); |
381 | pci_dev_put(findev); | ||
382 | return ret; | ||
380 | } | 383 | } |
381 | } | 384 | } |
382 | } | 385 | } |