nouveau: add nouveau_resource_destroy

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
main
Marcin Slusarz 2010-01-12 15:31:28 +01:00 committed by Francisco Jerez
parent 44a0e0a099
commit 55ba98fadf
2 changed files with 12 additions and 0 deletions

View File

@ -41,6 +41,15 @@ nouveau_resource_init(struct nouveau_resource **heap,
return 0;
}
void
nouveau_resource_destroy(struct nouveau_resource **heap)
{
if (!*heap)
return;
free(*heap);
*heap = NULL;
}
int
nouveau_resource_alloc(struct nouveau_resource *heap, unsigned size, void *priv,
struct nouveau_resource **res)

View File

@ -38,6 +38,9 @@ int
nouveau_resource_init(struct nouveau_resource **heap, unsigned start,
unsigned size);
void
nouveau_resource_destroy(struct nouveau_resource **heap);
int
nouveau_resource_alloc(struct nouveau_resource *heap, unsigned size, void *priv,
struct nouveau_resource **);