summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2010-10-19 10:39:24 +0200
committerThomas Hellstrom <[email protected]>2010-10-19 11:28:18 +0200
commit2ab7a8a3ebf337aeed61166719adef9da4a1278a (patch)
treed378abe00080e5ced9de6b8931082dd6f33c0c6a
parent0301c9ac6207f21bae9e35c7f0bc18ea12491162 (diff)
st/xorg: Don't use deprecated x*alloc / xfree functions
Signed-off-by: Thomas Hellstrom <[email protected]>
-rw-r--r--src/gallium/state_trackers/xorg/xorg_crtc.c4
-rw-r--r--src/gallium/state_trackers/xorg/xorg_dri2.c24
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c14
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c8
-rw-r--r--src/gallium/state_trackers/xorg/xorg_output.c8
5 files changed, 29 insertions, 29 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index c65da71cdba..80af82d97b2 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -361,7 +361,7 @@ crtc_destroy(xf86CrtcPtr crtc)
drmModeFreeCrtc(crtcp->drm_crtc);
- xfree(crtcp);
+ free(crtcp);
crtc->driver_private = NULL;
}
@@ -409,7 +409,7 @@ xorg_crtc_init(ScrnInfoPtr pScrn)
if (crtc == NULL)
goto out;
- crtcp = xcalloc(1, sizeof(struct crtc_private));
+ crtcp = calloc(1, sizeof(struct crtc_private));
if (!crtcp) {
xf86CrtcDestroy(crtc);
goto out;
diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
index 704aed6a82c..b723a8e9cb0 100644
--- a/src/gallium/state_trackers/xorg/xorg_dri2.c
+++ b/src/gallium/state_trackers/xorg/xorg_dri2.c
@@ -201,11 +201,11 @@ dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, unsigned int form
DRI2Buffer2Ptr buffer;
BufferPrivatePtr private;
- buffer = xcalloc(1, sizeof *buffer);
+ buffer = calloc(1, sizeof *buffer);
if (!buffer)
return NULL;
- private = xcalloc(1, sizeof *private);
+ private = calloc(1, sizeof *private);
if (!private) {
goto fail;
}
@@ -217,9 +217,9 @@ dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, unsigned int form
if (dri2_do_create_buffer(pDraw, (DRI2BufferPtr)buffer, format))
return buffer;
- xfree(private);
+ free(private);
fail:
- xfree(buffer);
+ free(buffer);
return NULL;
}
@@ -229,8 +229,8 @@ dri2_destroy_buffer(DrawablePtr pDraw, DRI2Buffer2Ptr buffer)
/* So far it is safe to downcast a DRI2Buffer2Ptr to DRI2BufferPtr */
dri2_do_destroy_buffer(pDraw, (DRI2BufferPtr)buffer);
- xfree(buffer->driverPrivate);
- xfree(buffer);
+ free(buffer->driverPrivate);
+ free(buffer);
}
#endif /* DRI2INFOREC_VERSION >= 2 */
@@ -244,11 +244,11 @@ dri2_create_buffers(DrawablePtr pDraw, unsigned int *attachments, int count)
DRI2BufferPtr buffers;
int i;
- buffers = xcalloc(count, sizeof *buffers);
+ buffers = calloc(count, sizeof *buffers);
if (!buffers)
goto fail_buffers;
- privates = xcalloc(count, sizeof *privates);
+ privates = calloc(count, sizeof *privates);
if (!privates)
goto fail_privates;
@@ -263,9 +263,9 @@ dri2_create_buffers(DrawablePtr pDraw, unsigned int *attachments, int count)
return buffers;
fail:
- xfree(privates);
+ free(privates);
fail_privates:
- xfree(buffers);
+ free(buffers);
fail_buffers:
return NULL;
}
@@ -280,8 +280,8 @@ dri2_destroy_buffers(DrawablePtr pDraw, DRI2BufferPtr buffers, int count)
}
if (buffers) {
- xfree(buffers[0].driverPrivate);
- xfree(buffers);
+ free(buffers[0].driverPrivate);
+ free(buffers);
}
}
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 3a5db9856d4..2d71a5e792f 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -122,7 +122,7 @@ xorg_tracker_set_functions(ScrnInfoPtr scrn)
Bool
xorg_tracker_have_modesetting(ScrnInfoPtr pScrn, struct pci_device *device)
{
- char *BusID = xalloc(64);
+ char *BusID = malloc(64);
sprintf(BusID, "pci:%04x:%02x:%02x.%d",
device->domain, device->bus,
device->dev, device->func);
@@ -130,14 +130,14 @@ xorg_tracker_have_modesetting(ScrnInfoPtr pScrn, struct pci_device *device)
if (drmCheckModesettingSupported(BusID)) {
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
"Drm modesetting not supported %s\n", BusID);
- xfree(BusID);
+ free(BusID);
return FALSE;
}
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
"Drm modesetting supported on %s\n", BusID);
- xfree(BusID);
+ free(BusID);
return TRUE;
}
@@ -174,7 +174,7 @@ drv_free_rec(ScrnInfoPtr pScrn)
if (!pScrn->driverPrivate)
return;
- xfree(pScrn->driverPrivate);
+ free(pScrn->driverPrivate);
pScrn->driverPrivate = NULL;
}
@@ -274,7 +274,7 @@ drv_init_drm(ScrnInfoPtr pScrn)
if (ms->fd < 0) {
char *BusID;
- BusID = xalloc(64);
+ BusID = malloc(64);
sprintf(BusID, "PCI:%d:%d:%d",
((ms->PciInfo->domain << 8) | ms->PciInfo->bus),
ms->PciInfo->dev, ms->PciInfo->func
@@ -283,7 +283,7 @@ drv_init_drm(ScrnInfoPtr pScrn)
ms->fd = drmOpen(driver_descriptor.driver_name, BusID);
ms->isMaster = TRUE;
- xfree(BusID);
+ free(BusID);
if (ms->fd >= 0)
return TRUE;
@@ -432,7 +432,7 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
/* Process the options */
xf86CollectOptions(pScrn, NULL);
- if (!(ms->Options = xalloc(sizeof(drv_options))))
+ if (!(ms->Options = malloc(sizeof(drv_options))))
return FALSE;
memcpy(ms->Options, drv_options, sizeof(drv_options));
xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, ms->Options);
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 6b2c80fbca6..0e5693dc786 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -720,7 +720,7 @@ ExaCreatePixmap(ScreenPtr pScreen, int size, int align)
{
struct exa_pixmap_priv *priv;
- priv = xcalloc(1, sizeof(struct exa_pixmap_priv));
+ priv = calloc(1, sizeof(struct exa_pixmap_priv));
if (!priv)
return NULL;
@@ -737,7 +737,7 @@ ExaDestroyPixmap(ScreenPtr pScreen, void *dPriv)
pipe_resource_reference(&priv->tex, NULL);
- xfree(priv);
+ free(priv);
}
static Bool
@@ -975,7 +975,7 @@ xorg_exa_close(ScrnInfoPtr pScrn)
ms->ctx = NULL;
exaDriverFini(pScrn->pScreen);
- xfree(exa);
+ free(exa);
ms->exa = NULL;
}
@@ -987,7 +987,7 @@ xorg_exa_init(ScrnInfoPtr pScrn, Bool accel)
ExaDriverPtr pExa;
CustomizerPtr cust = ms->cust;
- exa = xcalloc(1, sizeof(struct exa_context));
+ exa = calloc(1, sizeof(struct exa_context));
if (!exa)
return NULL;
diff --git a/src/gallium/state_trackers/xorg/xorg_output.c b/src/gallium/state_trackers/xorg/xorg_output.c
index 61206ed751c..5555b51131c 100644
--- a/src/gallium/state_trackers/xorg/xorg_output.c
+++ b/src/gallium/state_trackers/xorg/xorg_output.c
@@ -128,7 +128,7 @@ output_get_modes(xf86OutputPtr output)
for (i = 0; i < drm_connector->count_modes; i++) {
drm_mode = &drm_connector->modes[i];
if (drm_mode) {
- mode = xcalloc(1, sizeof(DisplayModeRec));
+ mode = calloc(1, sizeof(DisplayModeRec));
if (!mode)
continue;
mode->Clock = drm_mode->clock;
@@ -195,7 +195,7 @@ output_destroy(xf86OutputPtr output)
{
struct output_private *priv = output->driver_private;
drmModeFreeConnector(priv->drm_connector);
- xfree(priv);
+ free(priv);
output->driver_private = NULL;
}
@@ -262,14 +262,14 @@ xorg_output_init(ScrnInfoPtr pScrn)
drm_connector->connector_type_id);
- priv = xcalloc(sizeof(*priv), 1);
+ priv = calloc(sizeof(*priv), 1);
if (!priv) {
continue;
}
output = xf86OutputCreate(pScrn, &output_funcs, name);
if (!output) {
- xfree(priv);
+ free(priv);
continue;
}