nouveau: add nouveau_resource_destroy
Signed-off-by: Francisco Jerez <currojerez@riseup.net>main
parent
44a0e0a099
commit
55ba98fadf
|
@ -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)
|
||||
|
|
|
@ -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 **);
|
||||
|
|
Loading…
Reference in New Issue