diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-19 01:38:49 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-19 01:40:56 -0700 |
commit | efe1792818be463dd0367178f0233bc502b7a584 (patch) | |
tree | d0d4fe2e433ec4d923ff2c1c8399fc9f9506cfeb | |
parent | 1f84310ddf49778f776a39810aa98211c812e8ab (diff) | |
download | xorg-driver-xf86-video-vesa-efe1792818be463dd0367178f0233bc502b7a584.tar.gz |
Code style cleanup to make the map and unmap blocks more consistent
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | src/vesa.c | 39 |
1 files changed, 20 insertions, 19 deletions
@@ -1260,27 +1260,28 @@ VESAMapVidMem(ScrnInfoPtr pScrn) pScrn->fbOffset = pVesa->mapOff; #ifdef XSERVER_LIBPCIACCESS - if ((pVesa->mapPhys != 0xa0000) && (pVesa->pciInfo != NULL)) { - (void) pci_device_map_range(pVesa->pciInfo, pScrn->memPhysBase, - pVesa->mapSize, - (PCI_DEV_MAP_FLAG_WRITABLE - | PCI_DEV_MAP_FLAG_WRITE_COMBINE), - & pVesa->base); - } - else - (void) pci_device_map_legacy(pVesa->pciInfo, pScrn->memPhysBase, - pVesa->mapSize, - PCI_DEV_MAP_FLAG_WRITABLE, - & pVesa->base); - - if (pVesa->base) { - if (pVesa->mapPhys != 0xa0000) - (void) pci_device_map_legacy(pVesa->pciInfo, 0xa0000, 0x10000, + if (pVesa->pciInfo != NULL) { + if (pVesa->mapPhys != 0xa0000) { + (void) pci_device_map_range(pVesa->pciInfo, pScrn->memPhysBase, + pVesa->mapSize, + (PCI_DEV_MAP_FLAG_WRITABLE + | PCI_DEV_MAP_FLAG_WRITE_COMBINE), + & pVesa->base); + + if (pVesa->base) + (void) pci_device_map_legacy(pVesa->pciInfo, 0xa0000, 0x10000, + PCI_DEV_MAP_FLAG_WRITABLE, + & pVesa->VGAbase); + } + else { + (void) pci_device_map_legacy(pVesa->pciInfo, pScrn->memPhysBase, + pVesa->mapSize, PCI_DEV_MAP_FLAG_WRITABLE, - & pVesa->VGAbase); - else - pVesa->VGAbase = pVesa->base; + & pVesa->base); + if (pVesa->base) + pVesa->VGAbase = pVesa->base; + } } #else if (pVesa->mapPhys != 0xa0000 && pVesa->pEnt->location.type == BUS_PCI) |