summaryrefslogtreecommitdiff
path: root/nuttx/drivers/usbhost/usbhost_skeleton.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-06 16:40:47 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-06 16:40:47 +0000
commit4011b03fa6a6a7889efea3451a3a125faa72c7fc (patch)
treec6a1b2ba8ef824b137cd423a245a8cb1c35a0786 /nuttx/drivers/usbhost/usbhost_skeleton.c
parente888bb3a55e974475a87fee0371f4405ddab696e (diff)
downloadnuttx-4011b03fa6a6a7889efea3451a3a125faa72c7fc.tar.gz
nuttx-4011b03fa6a6a7889efea3451a3a125faa72c7fc.tar.bz2
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/usbhost/usbhost_skeleton.c')
-rw-r--r--nuttx/drivers/usbhost/usbhost_skeleton.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/nuttx/drivers/usbhost/usbhost_skeleton.c b/nuttx/drivers/usbhost/usbhost_skeleton.c
index efb7a58ba..c33dda586 100644
--- a/nuttx/drivers/usbhost/usbhost_skeleton.c
+++ b/nuttx/drivers/usbhost/usbhost_skeleton.c
@@ -47,6 +47,7 @@
#include <errno.h>
#include <debug.h>
+#include <nuttx/kmalloc.h>
#include <nuttx/fs.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
@@ -252,7 +253,7 @@ static inline FAR struct usbhost_state_s *usbhost_allocclass(void)
FAR struct usbhost_state_s *priv;
DEBUGASSERT(!up_interrupt_context());
- priv = (FAR struct usbhost_state_s *)malloc(sizeof(struct usbhost_state_s));
+ priv = (FAR struct usbhost_state_s *)kmalloc(sizeof(struct usbhost_state_s));
uvdbg("Allocated: %p\n", priv);;
return priv;
}
@@ -275,12 +276,12 @@ static inline void usbhost_freeclass(FAR struct usbhost_state_s *class)
{
DEBUGASSERT(class != NULL);
- /* Free the class instance (calling sched_free() in case we are executing
- * from an interrupt handler.
+ /* Free the class instance (perhaps calling sched_free() in case we are
+ * executing from an interrupt handler.
*/
uvdbg("Freeing: %p\n", class);;
- free(class);
+ kfree(class);
}
/****************************************************************************