diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-10-03 04:14:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:09 -0400 |
commit | 652aa16291095911640137155063a5c6ea9bad74 (patch) | |
tree | 6c463c8da82045e9ecdbb1e7e3242c12b4be6bae /drivers/ide/pci/cy82c693.c | |
parent | a4bea10eca68152e84ffc4eaeb9d20ec2ac34664 (diff) |
[PATCH] IDE: more pci_find cleanup
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/cy82c693.c')
-rw-r--r-- | drivers/ide/pci/cy82c693.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index 120929fbe7a3..64330c459bd4 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c | |||
@@ -281,7 +281,7 @@ static void cy82c693_tune_drive (ide_drive_t *drive, u8 pio) | |||
281 | 281 | ||
282 | /* select primary or secondary channel */ | 282 | /* select primary or secondary channel */ |
283 | if (hwif->index > 0) { /* drive is on the secondary channel */ | 283 | if (hwif->index > 0) { /* drive is on the secondary channel */ |
284 | dev = pci_find_slot(dev->bus->number, dev->devfn+1); | 284 | dev = pci_get_slot(dev->bus, dev->devfn+1); |
285 | if (!dev) { | 285 | if (!dev) { |
286 | printk(KERN_ERR "%s: tune_drive: " | 286 | printk(KERN_ERR "%s: tune_drive: " |
287 | "Cannot find secondary interface!\n", | 287 | "Cannot find secondary interface!\n", |
@@ -500,8 +500,9 @@ static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_dev | |||
500 | Function 1 is primary IDE channel, function 2 - secondary. */ | 500 | Function 1 is primary IDE channel, function 2 - secondary. */ |
501 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && | 501 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && |
502 | PCI_FUNC(dev->devfn) == 1) { | 502 | PCI_FUNC(dev->devfn) == 1) { |
503 | dev2 = pci_find_slot(dev->bus->number, dev->devfn + 1); | 503 | dev2 = pci_get_slot(dev->bus, dev->devfn + 1); |
504 | ret = ide_setup_pci_devices(dev, dev2, d); | 504 | ret = ide_setup_pci_devices(dev, dev2, d); |
505 | /* We leak pci refs here but thats ok - we can't be unloaded */ | ||
505 | } | 506 | } |
506 | return ret; | 507 | return ret; |
507 | } | 508 | } |