All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [libdrm PATCH 1/4] nouveau: add nouveau_resource_destroy
Date: Tue, 12 Jan 2010 15:31:28 +0100	[thread overview]
Message-ID: <20100112143128.GA2984@joi.lan> (raw)

From: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [libdrm PATCH] nouveau: add nouveau_resource_destroy

---
 nouveau/nouveau_resource.c |    9 +++++++++
 nouveau/nouveau_resource.h |    3 +++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/nouveau/nouveau_resource.c b/nouveau/nouveau_resource.c
index 6bef756..7acaf7d 100644
--- a/nouveau/nouveau_resource.c
+++ b/nouveau/nouveau_resource.c
@@ -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)
diff --git a/nouveau/nouveau_resource.h b/nouveau/nouveau_resource.h
index 988d246..b760dfb 100644
--- a/nouveau/nouveau_resource.h
+++ b/nouveau/nouveau_resource.h
@@ -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 **);
-- 
1.6.6.rc3

             reply	other threads:[~2010-01-12 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 14:31 Marcin Slusarz [this message]
     [not found] ` <20100112143128.GA2984-OI9uyE9O0yo@public.gmane.org>
2010-01-14 23:02   ` [libdrm PATCH 1/4] nouveau: add nouveau_resource_destroy Maarten Maathuis
     [not found]     ` <6d4bc9fc1001141502l78f40a00n1074cdd4bf00a815-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-21 21:33       ` Marcin Slusarz
     [not found]         ` <20100121213306.GA2879-OI9uyE9O0yo@public.gmane.org>
2010-01-22 10:10           ` Christoph Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100112143128.GA2984@joi.lan \
    --to=marcin.slusarz-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.