summaryrefslogtreecommitdiff
path: root/src/mga_driver.c
diff options
context:
space:
mode:
authorIan Romanick <idr@umwelt.(none)>2006-08-08 16:59:15 -0700
committerIan Romanick <idr@umwelt.(none)>2006-08-08 16:59:15 -0700
commit160b1f79fab7266a24b7d1a680cdf29bad9707c1 (patch)
treeee5fbc49e7110ca55a2b963914cd7577515dd1f0 /src/mga_driver.c
parent068e3427cfdf3e3b5dc5c97872d5f52f47ff0d68 (diff)
Store the pci_device pointer passed into MGAPciProbe instead of
searching for it in MGAPreInit.
Diffstat (limited to 'src/mga_driver.c')
-rw-r--r--src/mga_driver.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mga_driver.c b/src/mga_driver.c
index f73fee8..94d7f29 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -637,6 +637,7 @@ MGAPciProbe(DriverPtr drv, int entity_num, struct pci_device * dev,
pMga = MGAPTR(pScrn);
pMga->chip_attribs = & attribs[ match_data ];
+ pMga->PciInfo = dev;
/*
@@ -1189,9 +1190,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
if (!vgaHWGetHWRec(pScrn))
return FALSE;
- /* Find the PCI info for this screen */
- pMga->PciInfo = xf86GetPciInfoForEntity(pMga->pEnt->index);
-
pMga->Primary = xf86IsPrimaryPci(pMga->PciInfo);
#ifndef DISABLE_VGA_IO
@@ -1229,6 +1227,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
pMga->Chipset = pMga->PciInfo->device_id;
pScrn->chipset = (char *)xf86TokenToString(MGAChipsets, pMga->Chipset);
}
+
if (pMga->device->chipRev >= 0) {
pMga->ChipRev = pMga->device->chipRev;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "ChipRev override: %d\n",