summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86pciBus.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-01-12 10:59:35 -0800
committerIan Romanick <idr@us.ibm.com>2007-01-12 10:59:35 -0800
commit3936caa00535d0b7543be5a4b315562111a6b3ab (patch)
tree94eb306531b05a6e6241aeaf8ce87cfc8cb27d93 /hw/xfree86/common/xf86pciBus.c
parent1a493509e30412a0f6c6f8f8e47a446678dbbc1a (diff)
Refactor pciTagConvertRange2Host and pciConvertRange2Host.
Diffstat (limited to 'hw/xfree86/common/xf86pciBus.c')
-rw-r--r--hw/xfree86/common/xf86pciBus.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 11e9bc008..00aad1508 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1025,9 +1025,17 @@ xf86CheckPciSlot(const struct pci_device *d)
}
-static void
-pciTagConvertRange2Host(PCITAG tag, resRange *pRange)
+void
+pciConvertRange2Host(int entityIndex, resRange *pRange)
{
+ struct pci_device *const pvp = xf86GetPciInfoForEntity(entityIndex);
+ const PCITAG tag = PCI_MAKE_TAG(PCI_MAKE_BUS(pvp->domain, pvp->bus),
+ pvp->dev, pvp->func);
+
+ if (pvp == NULL) {
+ return;
+ }
+
if (!(pRange->type & ResBus))
return;
@@ -1066,15 +1074,3 @@ pciTagConvertRange2Host(PCITAG tag, resRange *pRange)
pRange->type &= ~(ResDomain | ResBus);
pRange->type |= xf86GetPciDomain(tag) << 24;
}
-
-void
-pciConvertRange2Host(int entityIndex, resRange *pRange)
-{
- const struct pci_device * const pvp = xf86GetPciInfoForEntity(entityIndex);
-
- if ( pvp != NULL ) {
- const PCITAG tag = PCI_MAKE_TAG( PCI_MAKE_BUS( pvp->domain, pvp->bus ),
- pvp->dev, pvp->func );
- pciTagConvertRange2Host(tag, pRange);
- }
-}