summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
index 48765b150..743206451 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
@@ -1329,10 +1329,10 @@ void R128DRICloseScreen(ScreenPtr pScreen)
drmUnmap(info->ring, info->ringMapSize);
info->ring = NULL;
}
- if (info->agpMemHandle!=DRM_AGP_NO_HANDLE) {
+ if (info->agpMemHandle != DRM_AGP_NO_HANDLE) {
drmAgpUnbind(info->drmFD, info->agpMemHandle);
drmAgpFree(info->drmFD, info->agpMemHandle);
- info->agpMemHandle = 0;
+ info->agpMemHandle = DRM_AGP_NO_HANDLE;
drmAgpRelease(info->drmFD);
}
if (info->pciMemHandle) {
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c
index 6f1fa7520..2e201f660 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c
@@ -1389,10 +1389,10 @@ void MGADRICloseScreen( ScreenPtr pScreen )
pMGADRIServer->agpTextures.map = NULL;
}
- if ( pMGADRIServer->agp.handle ) {
+ if ( pMGADRIServer->agp.handle != DRM_AGP_NO_HANDLE ) {
drmAgpUnbind( pMga->drmFD, pMGADRIServer->agp.handle );
drmAgpFree( pMga->drmFD, pMGADRIServer->agp.handle );
- pMGADRIServer->agp.handle = 0;
+ pMGADRIServer->agp.handle = DRM_AGP_NO_HANDLE;
drmAgpRelease( pMga->drmFD );
}