diff options
author | Alan Cox <alan@redhat.com> | 2007-05-08 09:39:28 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 20:15:32 +0200 |
commit | d37363409bacd1142c6e49edfb3e1f8b153d47dc (patch) | |
tree | 2aa26a4e06020b714192f746a11c0be4c7b7c5fb /drivers/video/nvidia/nv_setup.c | |
parent | vmlfb: framebuffer driver for Intel Vermilion Range (diff) | |
download | linux-d37363409bacd1142c6e49edfb3e1f8b153d47dc.tar.xz linux-d37363409bacd1142c6e49edfb3e1f8b153d47dc.zip |
nvidiafb/rivafb: switch to pci_get refcounting
Switch to pci_get refcounting APIs
[adaplas]
Fix a long-standing bug where the return value of
pci_find_slot()/pci_get_bus_and_slot() is ignored.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/nvidia/nv_setup.c')
-rw-r--r-- | drivers/video/nvidia/nv_setup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/nvidia/nv_setup.c b/drivers/video/nvidia/nv_setup.c index 336ddb0d10b8..707e2c8a13ed 100644 --- a/drivers/video/nvidia/nv_setup.c +++ b/drivers/video/nvidia/nv_setup.c @@ -261,7 +261,7 @@ static void nv10GetConfig(struct nvidia_par *par) } #endif - dev = pci_find_slot(0, 1); + dev = pci_get_bus_and_slot(0, 1); if ((par->Chipset & 0xffff) == 0x01a0) { int amt = 0; @@ -276,6 +276,7 @@ static void nv10GetConfig(struct nvidia_par *par) par->RamAmountKBytes = (NV_RD32(par->PFB, 0x020C) & 0xFFF00000) >> 10; } + pci_dev_put(dev); par->CrystalFreqKHz = (NV_RD32(par->PEXTDEV, 0x0000) & (1 << 6)) ? 14318 : 13500; |