From patchwork Fri Sep 4 09:19:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 45609 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n849JbkN014190 for ; Fri, 4 Sep 2009 09:19:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933298AbZIDJTI (ORCPT ); Fri, 4 Sep 2009 05:19:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933251AbZIDJTI (ORCPT ); Fri, 4 Sep 2009 05:19:08 -0400 Received: from smtp.nokia.com ([192.100.122.230]:23051 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933269AbZIDJTH (ORCPT ); Fri, 4 Sep 2009 05:19:07 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n849IYuc010073 for ; Fri, 4 Sep 2009 12:18:59 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 4 Sep 2009 12:19:03 +0300 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 4 Sep 2009 12:19:03 +0300 Received: from dilbert.research.nokia.com (esdhcp034223.research.nokia.com [172.21.34.223]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n849J1oU020053 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Fri, 4 Sep 2009 12:19:02 +0300 Received: from andy by dilbert.research.nokia.com with local (Exim 4.69) (envelope-from ) id 1MjUwg-0007kT-4y; Fri, 04 Sep 2009 12:19:02 +0300 From: Andy Shevchenko To: linux-omap@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH 3/4] dspbridge: use linux memory allocator directly Date: Fri, 4 Sep 2009 12:19:00 +0300 Message-Id: <1252055941-29745-4-git-send-email-andy.shevchenko@gmail.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1252055941-29745-3-git-send-email-andy.shevchenko@gmail.com> References: <1252055941-29745-1-git-send-email-andy.shevchenko@gmail.com> <1252055941-29745-2-git-send-email-andy.shevchenko@gmail.com> <1252055941-29745-3-git-send-email-andy.shevchenko@gmail.com> X-OriginalArrivalTime: 04 Sep 2009 09:19:03.0068 (UTC) FILETIME=[BE7FBDC0:01CA2D40] Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Andy Shevchenko Instead of MEM_Calloc()/MEM_Free() use kzalloc()/kfree() calls. Thus we get rid of mem.h dependency. Signed-off-by: Andy Shevchenko --- arch/arm/plat-omap/include/dspbridge/list.h | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/list.h b/arch/arm/plat-omap/include/dspbridge/list.h index 414579f..867f5ac 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 -/* MEM_Calloc(), MEM_NONPAGED, MEM_Free() */ -#include +#include +#include #include #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,8 +116,7 @@ static inline struct LST_LIST *LST_Create(void) */ static inline void LST_Delete(struct LST_LIST *pList) { - if (pList != NULL) - MEM_Free(pList); + kfree(pList); } /*