From 4011b03fa6a6a7889efea3451a3a125faa72c7fc Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 6 Apr 2011 16:40:47 +0000 Subject: Fixes for kernel stub builds git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3473 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/drivers/mmcsd/mmcsd_sdio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'nuttx/drivers/mmcsd') diff --git a/nuttx/drivers/mmcsd/mmcsd_sdio.c b/nuttx/drivers/mmcsd/mmcsd_sdio.c index 3fd7b0847..28bbe08a3 100644 --- a/nuttx/drivers/mmcsd/mmcsd_sdio.c +++ b/nuttx/drivers/mmcsd/mmcsd_sdio.c @@ -52,6 +52,7 @@ #include #include +#include #include #include #include @@ -2891,7 +2892,7 @@ static void mmcsd_hwuninitialize(FAR struct mmcsd_state_s *priv) { mmcsd_removed(priv); SDIO_RESET(priv->dev); - free(priv); + kfree(priv); } } @@ -2932,7 +2933,7 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev) /* Allocate a MMC/SD state structure */ - priv = (FAR struct mmcsd_state_s *)malloc(sizeof(struct mmcsd_state_s)); + priv = (FAR struct mmcsd_state_s *)kmalloc(sizeof(struct mmcsd_state_s)); if (priv) { /* Initialize the MMC/SD state structure */ @@ -3010,6 +3011,6 @@ errout_with_hwinit: #endif mmcsd_hwuninitialize(priv); errout_with_alloc: - free(priv); + kfree(priv); return ret; } -- cgit v1.2.3