aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/alpha/kernel/pci.c3
-rw-r--r--arch/alpha/kernel/sys_miata.c10
-rw-r--r--arch/alpha/kernel/sys_nautilus.c2
3 files changed, 10 insertions, 5 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index ffb7d5423cc0..3c10b9a1ddf5 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -516,10 +516,11 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
516 if (bus == 0 && dfn == 0) { 516 if (bus == 0 && dfn == 0) {
517 hose = pci_isa_hose; 517 hose = pci_isa_hose;
518 } else { 518 } else {
519 dev = pci_find_slot(bus, dfn); 519 dev = pci_get_bus_and_slot(bus, dfn);
520 if (!dev) 520 if (!dev)
521 return -ENODEV; 521 return -ENODEV;
522 hose = dev->sysdata; 522 hose = dev->sysdata;
523 pci_dev_put(dev);
523 } 524 }
524 } 525 }
525 526
diff --git a/arch/alpha/kernel/sys_miata.c b/arch/alpha/kernel/sys_miata.c
index b8b817feb1ee..910b43cd63e8 100644
--- a/arch/alpha/kernel/sys_miata.c
+++ b/arch/alpha/kernel/sys_miata.c
@@ -183,11 +183,15 @@ miata_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
183 183
184 if((slot == 7) && (PCI_FUNC(dev->devfn) == 3)) { 184 if((slot == 7) && (PCI_FUNC(dev->devfn) == 3)) {
185 u8 irq=0; 185 u8 irq=0;
186 186 struct pci_dev *pdev = pci_get_slot(dev->bus, dev->devfn & ~7);
187 if(pci_read_config_byte(pci_find_slot(dev->bus->number, dev->devfn & ~(7)), 0x40,&irq)!=PCIBIOS_SUCCESSFUL) 187 if(pdev == NULL || pci_read_config_byte(pdev, 0x40,&irq) != PCIBIOS_SUCCESSFUL) {
188 pci_dev_put(pdev);
188 return -1; 189 return -1;
189 else 190 }
191 else {
192 pci_dev_put(pdev);
190 return irq; 193 return irq;
194 }
191 } 195 }
192 196
193 return COMMON_TABLE_LOOKUP; 197 return COMMON_TABLE_LOOKUP;
diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c
index 93744bab73fb..e7594a7cf585 100644
--- a/arch/alpha/kernel/sys_nautilus.c
+++ b/arch/alpha/kernel/sys_nautilus.c
@@ -200,7 +200,7 @@ nautilus_init_pci(void)
200 bus = pci_scan_bus(0, alpha_mv.pci_ops, hose); 200 bus = pci_scan_bus(0, alpha_mv.pci_ops, hose);
201 hose->bus = bus; 201 hose->bus = bus;
202 202
203 irongate = pci_find_slot(0, 0); 203 irongate = pci_get_bus_and_slot(0, 0);
204 bus->self = irongate; 204 bus->self = irongate;
205 bus->resource[1] = &irongate_mem; 205 bus->resource[1] = &irongate_mem;
206 206