diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2007-05-15 18:51:46 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-05-15 18:51:46 -0400 |
commit | 640b31bf1291d1fb8a3e90abed8f145410122bf8 (patch) | |
tree | b554ff28a8cd58740b92b907371075f109066f59 /drivers/ide/pci | |
parent | 122ab0887c36247bd4508c25e4fccf9264546fe2 (diff) |
sl82c105: Switch to ref counting API
Not sure how this one got missed in the great purge some time ago but it did.
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/sl82c105.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c index ac1ec170fd26..7c383d9cc472 100644 --- a/drivers/ide/pci/sl82c105.c +++ b/drivers/ide/pci/sl82c105.c | |||
@@ -349,7 +349,7 @@ static unsigned int sl82c105_bridge_revision(struct pci_dev *dev) | |||
349 | /* | 349 | /* |
350 | * The bridge should be part of the same device, but function 0. | 350 | * The bridge should be part of the same device, but function 0. |
351 | */ | 351 | */ |
352 | bridge = pci_find_slot(dev->bus->number, | 352 | bridge = pci_get_bus_and_slot(dev->bus->number, |
353 | PCI_DEVFN(PCI_SLOT(dev->devfn), 0)); | 353 | PCI_DEVFN(PCI_SLOT(dev->devfn), 0)); |
354 | if (!bridge) | 354 | if (!bridge) |
355 | return -1; | 355 | return -1; |
@@ -359,13 +359,15 @@ static unsigned int sl82c105_bridge_revision(struct pci_dev *dev) | |||
359 | */ | 359 | */ |
360 | if (bridge->vendor != PCI_VENDOR_ID_WINBOND || | 360 | if (bridge->vendor != PCI_VENDOR_ID_WINBOND || |
361 | bridge->device != PCI_DEVICE_ID_WINBOND_83C553 || | 361 | bridge->device != PCI_DEVICE_ID_WINBOND_83C553 || |
362 | bridge->class >> 8 != PCI_CLASS_BRIDGE_ISA) | 362 | bridge->class >> 8 != PCI_CLASS_BRIDGE_ISA) { |
363 | pci_dev_put(bridge); | ||
363 | return -1; | 364 | return -1; |
364 | 365 | } | |
365 | /* | 366 | /* |
366 | * We need to find function 0's revision, not function 1 | 367 | * We need to find function 0's revision, not function 1 |
367 | */ | 368 | */ |
368 | pci_read_config_byte(bridge, PCI_REVISION_ID, &rev); | 369 | pci_read_config_byte(bridge, PCI_REVISION_ID, &rev); |
370 | pci_dev_put(bridge); | ||
369 | 371 | ||
370 | return rev; | 372 | return rev; |
371 | } | 373 | } |