aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2005-11-07 02:39:35 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-09 15:13:14 -0500
commit48d68773629d52ef118cd3f78eef7545d68517ef (patch)
tree738347affbdb18d31d659e7208147222ec408899
parentcee029538151c0e7bb3cd1c298f222deeecb5ab8 (diff)
[PATCH] PCI: pci_find_device remove (ppc/platforms/85xx/mpc85xx_cds_common.c)
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_cds_common.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
index 5e8cc5ec6ab5..2959e3c4083d 100644
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
+++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
@@ -351,10 +351,10 @@ mpc85xx_cds_fixup_via(struct pci_controller *hose)
351void __init 351void __init
352mpc85xx_cds_pcibios_fixup(void) 352mpc85xx_cds_pcibios_fixup(void)
353{ 353{
354 struct pci_dev *dev = NULL; 354 struct pci_dev *dev;
355 u_char c; 355 u_char c;
356 356
357 if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, 357 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
358 PCI_DEVICE_ID_VIA_82C586_1, NULL))) { 358 PCI_DEVICE_ID_VIA_82C586_1, NULL))) {
359 /* 359 /*
360 * U-Boot does not set the enable bits 360 * U-Boot does not set the enable bits
@@ -371,21 +371,24 @@ mpc85xx_cds_pcibios_fixup(void)
371 */ 371 */
372 dev->irq = 14; 372 dev->irq = 14;
373 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); 373 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
374 pci_dev_put(dev);
374 } 375 }
375 376
376 /* 377 /*
377 * Force legacy USB interrupt routing 378 * Force legacy USB interrupt routing
378 */ 379 */
379 if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, 380 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
380 PCI_DEVICE_ID_VIA_82C586_2, NULL))) { 381 PCI_DEVICE_ID_VIA_82C586_2, NULL))) {
381 dev->irq = 10; 382 dev->irq = 10;
382 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10); 383 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10);
384 pci_dev_put(dev);
383 } 385 }
384 386
385 if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, 387 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
386 PCI_DEVICE_ID_VIA_82C586_2, dev))) { 388 PCI_DEVICE_ID_VIA_82C586_2, dev))) {
387 dev->irq = 11; 389 dev->irq = 11;
388 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11); 390 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11);
391 pci_dev_put(dev);
389 } 392 }
390} 393}
391#endif /* CONFIG_PCI */ 394#endif /* CONFIG_PCI */