diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-06 16:40:47 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-06 16:40:47 +0000 |
commit | 4011b03fa6a6a7889efea3451a3a125faa72c7fc (patch) | |
tree | c6a1b2ba8ef824b137cd423a245a8cb1c35a0786 /nuttx/drivers/mmcsd/mmcsd_sdio.c | |
parent | e888bb3a55e974475a87fee0371f4405ddab696e (diff) | |
download | px4-nuttx-4011b03fa6a6a7889efea3451a3a125faa72c7fc.tar.gz px4-nuttx-4011b03fa6a6a7889efea3451a3a125faa72c7fc.tar.bz2 px4-nuttx-4011b03fa6a6a7889efea3451a3a125faa72c7fc.zip |
Fixes for kernel stub builds
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3473 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/mmcsd/mmcsd_sdio.c')
-rw-r--r-- | nuttx/drivers/mmcsd/mmcsd_sdio.c | 7 |
1 files changed, 4 insertions, 3 deletions
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 <debug.h> #include <errno.h> +#include <nuttx/kmalloc.h> #include <nuttx/fs.h> #include <nuttx/ioctl.h> #include <nuttx/clock.h> @@ -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; } |