summaryrefslogtreecommitdiff
path: root/src/radeon_driver.c
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2010-06-14 08:52:16 +0200
committerMichel Dänzer <michel@daenzer.net>2010-06-21 08:18:15 +0200
commitf7a91ece264af9f3fd2fc18e99aefcda93ce9f5c (patch)
treedd5748ed2b94a860be6e66070e2c025cc9febad0 /src/radeon_driver.c
parentea37d24b1b6d4cbcf73e680846de25b72af216e3 (diff)
Convert x(c)alloc/xfree to m/calloc/free.
Fixes deprecation warnings with xserver master and should also work with older xservers.
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r--src/radeon_driver.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 7167ea06..2b7be55c 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -368,32 +368,32 @@ void RADEONFreeRec(ScrnInfoPtr pScrn)
info = RADEONPTR(pScrn);
if (info->cp) {
- xfree(info->cp);
+ free(info->cp);
info->cp = NULL;
}
if (info->dri) {
- xfree(info->dri);
+ free(info->dri);
info->dri = NULL;
}
if (info->accel_state) {
- xfree(info->accel_state);
+ free(info->accel_state);
info->accel_state = NULL;
}
for (i = 0; i < RADEON_MAX_BIOS_CONNECTOR; i++) {
if (info->encoders[i]) {
if (info->encoders[i]->dev_priv) {
- xfree(info->encoders[i]->dev_priv);
+ free(info->encoders[i]->dev_priv);
info->encoders[i]->dev_priv = NULL;
}
- xfree(info->encoders[i]);
+ free(info->encoders[i]);
info->encoders[i]= NULL;
}
}
- xfree(pScrn->driverPrivate);
+ free(pScrn->driverPrivate);
pScrn->driverPrivate = NULL;
}
@@ -2158,7 +2158,7 @@ static Bool RADEONPreInitAccel(ScrnInfoPtr pScrn)
int maxy = info->FbMapSize / (pScrn->displayWidth * info->CurrentLayout.pixel_bytes);
#endif
- if (!(info->accel_state = xcalloc(1, sizeof(struct radeon_accel_state)))) {
+ if (!(info->accel_state = calloc(1, sizeof(struct radeon_accel_state)))) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to allocate accel_state rec!\n");
return FALSE;
}
@@ -2329,12 +2329,12 @@ static Bool RADEONPreInitDRI(ScrnInfoPtr pScrn)
info->directRenderingEnabled = FALSE;
info->directRenderingInited = FALSE;
- if (!(info->dri = xcalloc(1, sizeof(struct radeon_dri)))) {
+ if (!(info->dri = calloc(1, sizeof(struct radeon_dri)))) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Unable to allocate dri rec!\n");
return FALSE;
}
- if (!(info->cp = xcalloc(1, sizeof(struct radeon_cp)))) {
+ if (!(info->cp = calloc(1, sizeof(struct radeon_cp)))) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Unable to allocate cp rec!\n");
return FALSE;
}
@@ -3085,7 +3085,7 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags)
/* We can't do this until we have a
pScrn->display. */
xf86CollectOptions(pScrn, NULL);
- if (!(info->Options = xalloc(sizeof(RADEONOptions))))
+ if (!(info->Options = malloc(sizeof(RADEONOptions))))
goto fail;
memcpy(info->Options, RADEONOptions, sizeof(RADEONOptions));
@@ -3249,7 +3249,7 @@ fail:
/* Pre-init failed. */
/* Free the video bios (if applicable) */
if (info->VBIOS) {
- xfree(info->VBIOS);
+ free(info->VBIOS);
info->VBIOS = NULL;
}
@@ -3670,9 +3670,9 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
"Initializing fb layer\n");
if (info->r600_shadow_fb) {
- info->fb_shadow = xcalloc(1,
- pScrn->displayWidth * pScrn->virtualY *
- ((pScrn->bitsPerPixel + 7) >> 3));
+ info->fb_shadow = calloc(1,
+ pScrn->displayWidth * pScrn->virtualY *
+ ((pScrn->bitsPerPixel + 7) >> 3));
if (info->fb_shadow == NULL) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Failed to allocate shadow framebuffer\n");
@@ -6018,7 +6018,7 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
#ifdef USE_EXA
if (info->accel_state->exa) {
exaDriverFini(pScreen);
- xfree(info->accel_state->exa);
+ free(info->accel_state->exa);
info->accel_state->exa = NULL;
}
#endif /* USE_EXA */
@@ -6029,7 +6029,7 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
info->accel_state->accel = NULL;
if (info->accel_state->scratch_save)
- xfree(info->accel_state->scratch_save);
+ free(info->accel_state->scratch_save);
info->accel_state->scratch_save = NULL;
}
#endif /* USE_XAA */