diff options
Diffstat (limited to 'drivers/ide/pci/via82cxxx.c')
-rw-r--r-- | drivers/ide/pci/via82cxxx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 9b7589e8e93e..2af634d7acf4 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -248,7 +248,7 @@ static struct via_isa_bridge *via_config_find(struct pci_dev **isa) | |||
248 | u8 t; | 248 | u8 t; |
249 | 249 | ||
250 | for (via_config = via_isa_bridges; via_config->id; via_config++) | 250 | for (via_config = via_isa_bridges; via_config->id; via_config++) |
251 | if ((*isa = pci_find_device(PCI_VENDOR_ID_VIA + | 251 | if ((*isa = pci_get_device(PCI_VENDOR_ID_VIA + |
252 | !!(via_config->flags & VIA_BAD_ID), | 252 | !!(via_config->flags & VIA_BAD_ID), |
253 | via_config->id, NULL))) { | 253 | via_config->id, NULL))) { |
254 | 254 | ||
@@ -256,6 +256,7 @@ static struct via_isa_bridge *via_config_find(struct pci_dev **isa) | |||
256 | if (t >= via_config->rev_min && | 256 | if (t >= via_config->rev_min && |
257 | t <= via_config->rev_max) | 257 | t <= via_config->rev_max) |
258 | break; | 258 | break; |
259 | pci_dev_put(*isa); | ||
259 | } | 260 | } |
260 | 261 | ||
261 | return via_config; | 262 | return via_config; |
@@ -283,6 +284,7 @@ static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const | |||
283 | via_config = via_config_find(&isa); | 284 | via_config = via_config_find(&isa); |
284 | if (!via_config->id) { | 285 | if (!via_config->id) { |
285 | printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n"); | 286 | printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n"); |
287 | pci_dev_put(isa); | ||
286 | return -ENODEV; | 288 | return -ENODEV; |
287 | } | 289 | } |
288 | 290 | ||
@@ -361,6 +363,7 @@ static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const | |||
361 | via_dma[via_config->flags & VIA_UDMA], | 363 | via_dma[via_config->flags & VIA_UDMA], |
362 | pci_name(dev)); | 364 | pci_name(dev)); |
363 | 365 | ||
366 | pci_dev_put(isa); | ||
364 | return 0; | 367 | return 0; |
365 | } | 368 | } |
366 | 369 | ||