public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: linux-omap@vger.kernel.org
Cc: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Subject: [PATCH 3/4] dspbridge: use linux memory allocator directly
Date: Thu,  3 Sep 2009 12:06:13 +0300	[thread overview]
Message-ID: <1251968774-25380-4-git-send-email-andy.shevchenko@gmail.com> (raw)
In-Reply-To: <1251968774-25380-3-git-send-email-andy.shevchenko@gmail.com>

From: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>

Instead of MEM_Calloc()/MEM_Free() use kzalloc()/kfree() calls. Thus we get rid
of mem.h dependency.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
---
 arch/arm/plat-omap/include/dspbridge/list.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/list.h b/arch/arm/plat-omap/include/dspbridge/list.h
index c9d9e49..9efbe9c 100644
--- a/arch/arm/plat-omap/include/dspbridge/list.h
+++ b/arch/arm/plat-omap/include/dspbridge/list.h
@@ -49,8 +49,8 @@
 #define LIST_
 
 #include <dspbridge/host_os.h>
-/* MEM_Calloc(), MEM_NONPAGED, MEM_Free() */
-#include <dspbridge/mem.h>
+#include <linux/types.h>
+#include <linux/slab.h>
 #include <linux/list.h>
 
 #define LST_ELEM            list_head
@@ -85,9 +85,9 @@ struct LST_LIST {
 static inline struct LST_LIST *LST_Create(void)
 {
 	struct LST_LIST *pList;
+	gfp_t flags = (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL;
 
-	pList = (struct LST_LIST *) MEM_Calloc(sizeof(struct LST_LIST),
-		MEM_NONPAGED);
+	pList = kzalloc(sizeof(*pList), flags);
 	if (pList != NULL)
 		INIT_LIST_HEAD(&pList->head);
 
@@ -116,7 +116,7 @@ static inline struct LST_LIST *LST_Create(void)
  */
 static inline void LST_Delete(struct LST_LIST *pList)
 {
-	MEM_Free(pList);
+	kfree(pList);
 }
 
 /*
-- 
1.5.6.5


  reply	other threads:[~2009-09-03  9:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-03  9:06 dspbridge rfc: get rid of services/list.c (try 2) Andy Shevchenko
2009-09-03  9:06 ` [PATCH 1/4] DSPBRIDGE: Get rid of services/list.c (step 1) Andy Shevchenko
2009-09-03  9:06   ` [PATCH 2/4] DSPBRIDGE: Get rid of services/list.c (step 2) Andy Shevchenko
2009-09-03  9:06     ` Andy Shevchenko [this message]
2009-09-03  9:06       ` [PATCH 4/4] dspbridge: Change LST_ELEM to list_head entirely Andy Shevchenko
2009-09-03  9:17         ` Artem Bityutskiy
2009-09-03  9:31           ` Andy Shevchenko
2009-09-03  9:36             ` Andy Shevchenko
2009-09-03 10:42           ` [PATCH] " Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2009-09-04  9:18 dspbridge rfc: get rid of services/list.c (rebased) Andy Shevchenko
2009-09-04  9:18 ` [PATCH 1/4] DSPBRIDGE: Get rid of services/list.c Andy Shevchenko
2009-09-04  9:18   ` [PATCH 2/4] " Andy Shevchenko
2009-09-04  9:19     ` [PATCH 3/4] dspbridge: use linux memory allocator directly Andy Shevchenko
2009-09-04 11:02       ` Artem Bityutskiy
2009-09-04 11:17         ` Andy Shevchenko

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=1251968774-25380-4-git-send-email-andy.shevchenko@gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=ext-andriy.shevchenko@nokia.com \
    --cc=linux-omap@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox