summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-10-19 01:38:49 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-19 01:40:56 -0700
commitefe1792818be463dd0367178f0233bc502b7a584 (patch)
treed0d4fe2e433ec4d923ff2c1c8399fc9f9506cfeb
parent1f84310ddf49778f776a39810aa98211c812e8ab (diff)
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.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/vesa.c b/src/vesa.c
index 5a0120c..23d9e14 100644
--- a/src/vesa.c
+++ b/src/vesa.c
@@ -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)