diff options
| -rw-r--r-- | arch/sparc64/kernel/pci.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index dbbd65ecd13d..0cb934aa46fb 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -804,25 +804,20 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, /* Return the domain nuber for this pci bus */ -int pci_domain_nr(struct pci_bus *bus) +int pci_domain_nr(struct pci_bus *pbus) { - struct pcidev_cookie *cookie = bus->sysdata; + struct pci_pbm_info *pbm = pbus->sysdata; int ret; - if (cookie != NULL) { - struct pci_pbm_info *pbm = cookie->pbm; - if (pbm == NULL || pbm->parent == NULL) { - ret = -ENXIO; - } else { - struct pci_controller_info *p = pbm->parent; - - ret = p->index; - if (p->pbms_same_domain == 0) - ret = ((ret << 1) + - ((pbm == &pbm->parent->pbm_B) ? 1 : 0)); - } - } else { + if (pbm == NULL || pbm->parent == NULL) { ret = -ENXIO; + } else { + struct pci_controller_info *p = pbm->parent; + + ret = p->index; + if (p->pbms_same_domain == 0) + ret = ((ret << 1) + + ((pbm == &pbm->parent->pbm_B) ? 1 : 0)); } return ret; |
