summaryrefslogtreecommitdiff
path: root/nuttx/drivers/usbhost/usbhost_hidkbd.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_hidkbd.c
parente888bb3a55e974475a87fee0371f4405ddab696e (diff)
downloadpx4-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/usbhost/usbhost_hidkbd.c')
-rw-r--r--nuttx/drivers/usbhost/usbhost_hidkbd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/nuttx/drivers/usbhost/usbhost_hidkbd.c b/nuttx/drivers/usbhost/usbhost_hidkbd.c
index 74adff7ba..ef880ea75 100644
--- a/nuttx/drivers/usbhost/usbhost_hidkbd.c
+++ b/nuttx/drivers/usbhost/usbhost_hidkbd.c
@@ -53,6 +53,7 @@
#include <errno.h>
#include <debug.h>
+#include <nuttx/kmalloc.h>
#include <nuttx/fs.h>
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
@@ -490,7 +491,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;
}
@@ -513,12 +514,10 @@ 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. */
uvdbg("Freeing: %p\n", class);;
- free(class);
+ kfree(class);
}
/****************************************************************************