Rename kfree to kmm_free for consistency with other naming conventions

This commit is contained in:
Gregory Nutt
2014-08-31 17:04:02 -06:00
parent bcb5a5316e
commit fcd7b9336e
31 changed files with 80 additions and 80 deletions
+4 -4
View File
@@ -726,7 +726,7 @@ static void dm320_freevideomemory(void)
#ifndef CONFIG_DM320_VID0_DISABLE #ifndef CONFIG_DM320_VID0_DISABLE
if (g_vid0base) if (g_vid0base)
{ {
kfree(g_vid0base); kmm_free(g_vid0base);
g_vid0base = NULL; g_vid0base = NULL;
#ifndef CONFIG_DM320_DISABLE_PINGPONG #ifndef CONFIG_DM320_DISABLE_PINGPONG
g_vid0ppbase = NULL; g_vid0ppbase = NULL;
@@ -737,7 +737,7 @@ static void dm320_freevideomemory(void)
#ifndef CONFIG_DM320_VID1_DISABLE #ifndef CONFIG_DM320_VID1_DISABLE
if (g_vid1base != 0) if (g_vid1base != 0)
{ {
kfree(g_vid1base); kmm_free(g_vid1base);
g_vid1base = NULL; g_vid1base = NULL;
} }
#endif #endif
@@ -745,7 +745,7 @@ static void dm320_freevideomemory(void)
#ifndef CONFIG_DM320_OSD0_DISABLE #ifndef CONFIG_DM320_OSD0_DISABLE
if (g_osd0base != 0) if (g_osd0base != 0)
{ {
kfree(g_osd0base); kmm_free(g_osd0base);
g_osd0base = NULL; g_osd0base = NULL;
} }
#endif #endif
@@ -753,7 +753,7 @@ static void dm320_freevideomemory(void)
#ifndef CONFIG_DM320_OSD1_DISABLE #ifndef CONFIG_DM320_OSD1_DISABLE
if (g_osd1base != 0) if (g_osd1base != 0)
{ {
kfree(g_osd1base); kmm_free(g_osd1base);
g_osd1base = NULL; g_osd1base = NULL;
} }
#endif #endif
+2 -2
View File
@@ -1969,7 +1969,7 @@ static void dm320_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct dm320_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct dm320_ep_s *)ep)->epphy);
kfree(privreq); kmm_free(privreq);
} }
/******************************************************************************* /*******************************************************************************
@@ -2009,7 +2009,7 @@ static void dm320_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
usbdev_dma_free(buf); usbdev_dma_free(buf);
#else #else
kfree(buf); kmm_free(buf);
#endif #endif
} }
#endif #endif
+2 -2
View File
@@ -2691,7 +2691,7 @@ static void lpc17_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc17_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc17_ep_s *)ep)->epphy);
kfree(privreq); kmm_free(privreq);
} }
/******************************************************************************* /*******************************************************************************
@@ -2768,7 +2768,7 @@ static void lpc17_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#else #else
usbtrace(TRACE_EPFREEBUFFER, privep->epphy); usbtrace(TRACE_EPFREEBUFFER, privep->epphy);
kfree(buf); kmm_free(buf);
#endif #endif
} }
+2 -2
View File
@@ -2003,7 +2003,7 @@ static int lpc17_alloc(FAR struct usbhost_driver_s *drvr,
* Some hardware supports special memory in which request and descriptor data can * Some hardware supports special memory in which request and descriptor data can
* be accessed more efficiently. This method provides a mechanism to free that * be accessed more efficiently. This method provides a mechanism to free that
* request/descriptor memory. If the underlying hardware does not support * request/descriptor memory. If the underlying hardware does not support
* such "special" memory, this functions may simply map to kfree(). * such "special" memory, this functions may simply map to kmm_free().
* *
* Input Parameters: * Input Parameters:
* drvr - The USB host driver instance obtained as a parameter from the call to * drvr - The USB host driver instance obtained as a parameter from the call to
@@ -2087,7 +2087,7 @@ static int lpc17_ioalloc(FAR struct usbhost_driver_s *drvr,
* Some hardware supports special memory in which IO data can be accessed more * Some hardware supports special memory in which IO data can be accessed more
* efficiently. This method provides a mechanism to free that IO buffer * efficiently. This method provides a mechanism to free that IO buffer
* memory. If the underlying hardware does not support such "special" memory, * memory. If the underlying hardware does not support such "special" memory,
* this functions may simply map to kfree(). * this functions may simply map to kmm_free().
* *
* Input Parameters: * Input Parameters:
* drvr - The USB host driver instance obtained as a parameter from the call to * drvr - The USB host driver instance obtained as a parameter from the call to
+2 -2
View File
@@ -2655,7 +2655,7 @@ static void lpc214x_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc214x_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc214x_ep_s *)ep)->epphy);
kfree(privreq); kmm_free(privreq);
} }
/******************************************************************************* /*******************************************************************************
@@ -2732,7 +2732,7 @@ static void lpc214x_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#else #else
usbtrace(TRACE_EPFREEBUFFER, privep->epphy); usbtrace(TRACE_EPFREEBUFFER, privep->epphy);
kfree(buf); kmm_free(buf);
#endif #endif
} }
+6 -6
View File
@@ -3679,7 +3679,7 @@ static int lpc31_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
/* Free the container */ /* Free the container */
kfree(epinfo); kmm_free(epinfo);
return OK; return OK;
} }
@@ -3740,7 +3740,7 @@ static int lpc31_alloc(FAR struct usbhost_driver_s *drvr,
* Some hardware supports special memory in which request and descriptor data * Some hardware supports special memory in which request and descriptor data
* can be accessed more efficiently. This method provides a mechanism to * can be accessed more efficiently. This method provides a mechanism to
* free that request/descriptor memory. If the underlying hardware does not * free that request/descriptor memory. If the underlying hardware does not
* support such "special" memory, this functions may simply map to kfree(). * support such "special" memory, this functions may simply map to kmm_free().
* *
* Input Parameters: * Input Parameters:
* drvr - The USB host driver instance obtained as a parameter from the call * drvr - The USB host driver instance obtained as a parameter from the call
@@ -3762,7 +3762,7 @@ static int lpc31_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
/* No special action is require to free the transfer/descriptor buffer memory */ /* No special action is require to free the transfer/descriptor buffer memory */
kfree(buffer); kmm_free(buffer);
return OK; return OK;
} }
@@ -4279,7 +4279,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
if (!g_qtdpool) if (!g_qtdpool)
{ {
usbhost_trace1(EHCI_TRACE1_QTDPOOLALLOC_FAILED, 0); usbhost_trace1(EHCI_TRACE1_QTDPOOLALLOC_FAILED, 0);
kfree(g_qhpool); kmm_free(g_qhpool);
return NULL; return NULL;
} }
#endif #endif
@@ -4292,8 +4292,8 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
if (!g_framelist) if (!g_framelist)
{ {
usbhost_trace1(EHCI_TRACE1_PERFLALLOC_FAILED, 0); usbhost_trace1(EHCI_TRACE1_PERFLALLOC_FAILED, 0);
kfree(g_qhpool); kmm_free(g_qhpool);
kfree(g_qtdpool); kmm_free(g_qtdpool);
return NULL; return NULL;
} }
#endif #endif
+2 -2
View File
@@ -1982,7 +1982,7 @@ static void lpc31_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc31_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc31_ep_s *)ep)->epphy);
kfree(privreq); kmm_free(privreq);
} }
/******************************************************************************* /*******************************************************************************
@@ -2022,7 +2022,7 @@ static void lpc31_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
usbdev_dma_free(buf); usbdev_dma_free(buf);
#else #else
kfree(buf); kmm_free(buf);
#endif #endif
} }
#endif #endif
+2 -2
View File
@@ -1982,7 +1982,7 @@ static void lpc43_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc43_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc43_ep_s *)ep)->epphy);
kfree(privreq); kmm_free(privreq);
} }
/******************************************************************************* /*******************************************************************************
@@ -2022,7 +2022,7 @@ static void lpc43_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
usbdev_dma_free(buf); usbdev_dma_free(buf);
#else #else
kfree(buf); kmm_free(buf);
#endif #endif
} }
#endif #endif
+4 -4
View File
@@ -657,25 +657,25 @@ static void sam_buffer_free(struct sam_emac_s *priv)
if (priv->txdesc) if (priv->txdesc)
{ {
kfree(priv->txdesc); kmm_free(priv->txdesc);
priv->txdesc = NULL; priv->txdesc = NULL;
} }
if (priv->rxdesc) if (priv->rxdesc)
{ {
kfree(priv->rxdesc); kmm_free(priv->rxdesc);
priv->rxdesc = NULL; priv->rxdesc = NULL;
} }
if (priv->txbuffer) if (priv->txbuffer)
{ {
kfree(priv->txbuffer); kmm_free(priv->txbuffer);
priv->txbuffer = NULL; priv->txbuffer = NULL;
} }
if (priv->rxbuffer) if (priv->rxbuffer)
{ {
kfree(priv->rxbuffer); kmm_free(priv->rxbuffer);
priv->rxbuffer = NULL; priv->rxbuffer = NULL;
} }
#endif #endif
+1 -1
View File
@@ -3019,7 +3019,7 @@ static void sam_ep_freereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
#endif #endif
usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog)); usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog));
kfree(privreq); kmm_free(privreq);
} }
/**************************************************************************** /****************************************************************************
+6 -6
View File
@@ -3519,7 +3519,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
/* Free the container */ /* Free the container */
kfree(epinfo); kmm_free(epinfo);
return OK; return OK;
} }
@@ -3580,7 +3580,7 @@ static int sam_alloc(FAR struct usbhost_driver_s *drvr,
* Some hardware supports special memory in which request and descriptor data * Some hardware supports special memory in which request and descriptor data
* can be accessed more efficiently. This method provides a mechanism to * can be accessed more efficiently. This method provides a mechanism to
* free that request/descriptor memory. If the underlying hardware does not * free that request/descriptor memory. If the underlying hardware does not
* support such "special" memory, this functions may simply map to kfree(). * support such "special" memory, this functions may simply map to kmm_free().
* *
* Input Parameters: * Input Parameters:
* drvr - The USB host driver instance obtained as a parameter from the call * drvr - The USB host driver instance obtained as a parameter from the call
@@ -3602,7 +3602,7 @@ static int sam_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
/* No special action is require to free the transfer/descriptor buffer memory */ /* No special action is require to free the transfer/descriptor buffer memory */
kfree(buffer); kmm_free(buffer);
return OK; return OK;
} }
@@ -4177,7 +4177,7 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller)
if (!g_qtdpool) if (!g_qtdpool)
{ {
usbhost_trace1(EHCI_TRACE1_QTDPOOLALLOC_FAILED, 0); usbhost_trace1(EHCI_TRACE1_QTDPOOLALLOC_FAILED, 0);
kfree(g_qhpool); kmm_free(g_qhpool);
return NULL; return NULL;
} }
#endif #endif
@@ -4190,8 +4190,8 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller)
if (!g_framelist) if (!g_framelist)
{ {
usbhost_trace1(EHCI_TRACE1_PERFLALLOC_FAILED, 0); usbhost_trace1(EHCI_TRACE1_PERFLALLOC_FAILED, 0);
kfree(g_qhpool); kmm_free(g_qhpool);
kfree(g_qtdpool); kmm_free(g_qtdpool);
return NULL; return NULL;
} }
#endif #endif
+4 -4
View File
@@ -662,25 +662,25 @@ static void sam_buffer_free(struct sam_emac_s *priv)
if (priv->txdesc) if (priv->txdesc)
{ {
kfree(priv->txdesc); kmm_free(priv->txdesc);
priv->txdesc = NULL; priv->txdesc = NULL;
} }
if (priv->rxdesc) if (priv->rxdesc)
{ {
kfree(priv->rxdesc); kmm_free(priv->rxdesc);
priv->rxdesc = NULL; priv->rxdesc = NULL;
} }
if (priv->txbuffer) if (priv->txbuffer)
{ {
kfree(priv->txbuffer); kmm_free(priv->txbuffer);
priv->txbuffer = NULL; priv->txbuffer = NULL;
} }
if (priv->rxbuffer) if (priv->rxbuffer)
{ {
kfree(priv->rxbuffer); kmm_free(priv->rxbuffer);
priv->rxbuffer = NULL; priv->rxbuffer = NULL;
} }
#endif #endif
+4 -4
View File
@@ -989,25 +989,25 @@ static void sam_buffer_free(struct sam_emac_s *priv)
if (priv->txdesc) if (priv->txdesc)
{ {
kfree(priv->txdesc); kmm_free(priv->txdesc);
priv->txdesc = NULL; priv->txdesc = NULL;
} }
if (priv->rxdesc) if (priv->rxdesc)
{ {
kfree(priv->rxdesc); kmm_free(priv->rxdesc);
priv->rxdesc = NULL; priv->rxdesc = NULL;
} }
if (priv->txbuffer) if (priv->txbuffer)
{ {
kfree(priv->txbuffer); kmm_free(priv->txbuffer);
priv->txbuffer = NULL; priv->txbuffer = NULL;
} }
if (priv->rxbuffer) if (priv->rxbuffer)
{ {
kfree(priv->rxbuffer); kmm_free(priv->rxbuffer);
priv->rxbuffer = NULL; priv->rxbuffer = NULL;
} }
#endif #endif
+4 -4
View File
@@ -593,25 +593,25 @@ static void sam_buffer_free(struct sam_gmac_s *priv)
if (priv->txdesc) if (priv->txdesc)
{ {
kfree(priv->txdesc); kmm_free(priv->txdesc);
priv->txdesc = NULL; priv->txdesc = NULL;
} }
if (priv->rxdesc) if (priv->rxdesc)
{ {
kfree(priv->rxdesc); kmm_free(priv->rxdesc);
priv->rxdesc = NULL; priv->rxdesc = NULL;
} }
if (priv->txbuffer) if (priv->txbuffer)
{ {
kfree(priv->txbuffer); kmm_free(priv->txbuffer);
priv->txbuffer = NULL; priv->txbuffer = NULL;
} }
if (priv->rxbuffer) if (priv->rxbuffer)
{ {
kfree(priv->rxbuffer); kmm_free(priv->rxbuffer);
priv->rxbuffer = NULL; priv->rxbuffer = NULL;
} }
#endif #endif
+3 -3
View File
@@ -2500,7 +2500,7 @@ errout_with_ed:
sam_edfree(ed); sam_edfree(ed);
errout_with_semaphore: errout_with_semaphore:
sam_givesem(&g_ohci.exclsem); sam_givesem(&g_ohci.exclsem);
kfree(eplist); kmm_free(eplist);
errout: errout:
return ret; return ret;
} }
@@ -2577,7 +2577,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
/* And free the container */ /* And free the container */
sem_destroy(&eplist->wdhsem); sem_destroy(&eplist->wdhsem);
kfree(eplist); kmm_free(eplist);
sam_givesem(&g_ohci.exclsem); sam_givesem(&g_ohci.exclsem);
return ret; return ret;
} }
@@ -2642,7 +2642,7 @@ static int sam_alloc(FAR struct usbhost_driver_s *drvr,
* Some hardware supports special memory in which request and descriptor data * Some hardware supports special memory in which request and descriptor data
* can be accessed more efficiently. This method provides a mechanism to * can be accessed more efficiently. This method provides a mechanism to
* free that request/descriptor memory. If the underlying hardware does not * free that request/descriptor memory. If the underlying hardware does not
* support such "special" memory, this functions may simply map to kfree(). * support such "special" memory, this functions may simply map to kmm_free().
* *
* Input Parameters: * Input Parameters:
* drvr - The USB host driver instance obtained as a parameter from the call * drvr - The USB host driver instance obtained as a parameter from the call
+1 -1
View File
@@ -3524,7 +3524,7 @@ errout_with_clocking:
errout_with_alloc: errout_with_alloc:
sem_destroy(&priv->exclsem); sem_destroy(&priv->exclsem);
kfree(priv); kmm_free(priv);
return NULL; return NULL;
} }
+1 -1
View File
@@ -3508,7 +3508,7 @@ static void sam_ep_freereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
#endif #endif
usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog)); usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog));
kfree(privreq); kmm_free(privreq);
} }
/**************************************************************************** /****************************************************************************
+2 -2
View File
@@ -1977,7 +1977,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
if (--((struct stm32_i2c_inst_s *)dev)->priv->refs) if (--((struct stm32_i2c_inst_s *)dev)->priv->refs)
{ {
irqrestore(irqs); irqrestore(irqs);
kfree(dev); kmm_free(dev);
return OK; return OK;
} }
@@ -1991,7 +1991,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
stm32_i2c_sem_destroy((struct i2c_dev_s *)dev); stm32_i2c_sem_destroy((struct i2c_dev_s *)dev);
kfree(dev); kmm_free(dev);
return OK; return OK;
} }
+2 -2
View File
@@ -2505,7 +2505,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
if (--((struct stm32_i2c_inst_s *)dev)->priv->refs) if (--((struct stm32_i2c_inst_s *)dev)->priv->refs)
{ {
irqrestore(irqs); irqrestore(irqs);
kfree(dev); kmm_free(dev);
return OK; return OK;
} }
@@ -2519,7 +2519,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
stm32_i2c_sem_destroy((struct i2c_dev_s *)dev); stm32_i2c_sem_destroy((struct i2c_dev_s *)dev);
kfree(dev); kmm_free(dev);
return OK; return OK;
} }
+2 -2
View File
@@ -4269,7 +4269,7 @@ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct stm32_ep_s *)ep)->epphy); usbtrace(TRACE_EPFREEREQ, ((FAR struct stm32_ep_s *)ep)->epphy);
kfree(privreq); kmm_free(privreq);
} }
/******************************************************************************* /*******************************************************************************
@@ -4309,7 +4309,7 @@ static void stm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
usbdev_dma_free(buf); usbdev_dma_free(buf);
#else #else
kfree(buf); kmm_free(buf);
#endif #endif
} }
#endif #endif
+4 -4
View File
@@ -3534,7 +3534,7 @@ static int stm32_alloc(FAR struct usbhost_driver_s *drvr,
* Some hardware supports special memory in which request and descriptor data can * Some hardware supports special memory in which request and descriptor data can
* be accessed more efficiently. This method provides a mechanism to free that * be accessed more efficiently. This method provides a mechanism to free that
* request/descriptor memory. If the underlying hardware does not support * request/descriptor memory. If the underlying hardware does not support
* such "special" memory, this functions may simply map to kfree(). * such "special" memory, this functions may simply map to kmm_free().
* *
* Input Parameters: * Input Parameters:
* drvr - The USB host driver instance obtained as a parameter from the call to * drvr - The USB host driver instance obtained as a parameter from the call to
@@ -3555,7 +3555,7 @@ static int stm32_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
/* There is no special memory requirement */ /* There is no special memory requirement */
DEBUGASSERT(drvr && buffer); DEBUGASSERT(drvr && buffer);
kfree(buffer); kmm_free(buffer);
return OK; return OK;
} }
@@ -3614,7 +3614,7 @@ static int stm32_ioalloc(FAR struct usbhost_driver_s *drvr,
* Some hardware supports special memory in which IO data can be accessed more * Some hardware supports special memory in which IO data can be accessed more
* efficiently. This method provides a mechanism to free that IO buffer * efficiently. This method provides a mechanism to free that IO buffer
* memory. If the underlying hardware does not support such "special" memory, * memory. If the underlying hardware does not support such "special" memory,
* this functions may simply map to kfree(). * this functions may simply map to kmm_free().
* *
* Input Parameters: * Input Parameters:
* drvr - The USB host driver instance obtained as a parameter from the call to * drvr - The USB host driver instance obtained as a parameter from the call to
@@ -3635,7 +3635,7 @@ static int stm32_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
/* There is no special memory requirement */ /* There is no special memory requirement */
DEBUGASSERT(drvr && buffer); DEBUGASSERT(drvr && buffer);
kfree(buffer); kmm_free(buffer);
return OK; return OK;
} }
+1 -1
View File
@@ -193,7 +193,7 @@ static int ccm_close(FAR struct file *filep)
/* Release the file attributes structure */ /* Release the file attributes structure */
kfree(priv); kmm_free(priv);
filep->f_priv = NULL; filep->f_priv = NULL;
return OK; return OK;
} }
+1 -1
View File
@@ -3005,7 +3005,7 @@ static void stm32_epfreereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
#endif #endif
usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog)); usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog));
kfree(privreq); kmm_free(privreq);
} }
/**************************************************************************** /****************************************************************************
+2 -2
View File
@@ -2068,7 +2068,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
if (--((struct stm32_i2c_inst_s *)dev)->priv->refs) if (--((struct stm32_i2c_inst_s *)dev)->priv->refs)
{ {
irqrestore(irqs); irqrestore(irqs);
kfree(dev); kmm_free(dev);
return OK; return OK;
} }
@@ -2082,7 +2082,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
stm32_i2c_sem_destroy( (struct i2c_dev_s *)dev ); stm32_i2c_sem_destroy( (struct i2c_dev_s *)dev );
kfree(dev); kmm_free(dev);
return OK; return OK;
} }
+2 -2
View File
@@ -2320,7 +2320,7 @@ static void avr_epfreereq(FAR struct usbdev_ep_s *ep,
#endif #endif
usbtrace(TRACE_EPFREEREQ, ((FAR struct avr_ep_s *)ep)->ep.eplog); usbtrace(TRACE_EPFREEREQ, ((FAR struct avr_ep_s *)ep)->ep.eplog);
kfree(privreq); kmm_free(privreq);
} }
/******************************************************************************* /*******************************************************************************
@@ -2360,7 +2360,7 @@ static void avr_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
#ifdef CONFIG_USBDEV_DMAMEMORY #ifdef CONFIG_USBDEV_DMAMEMORY
usbdev_dma_free(buf); usbdev_dma_free(buf);
#else #else
kfree(buf); kmm_free(buf);
#endif #endif
} }
#endif #endif
+1 -1
View File
@@ -3352,7 +3352,7 @@ static void pic32mx_epfreereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
#endif #endif
usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog)); usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog));
kfree(privreq); kmm_free(privreq);
} }
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -125,7 +125,7 @@ int rtos_bridge_init(struct rgmp_bridge *b)
return 0; return 0;
err1: err1:
kfree(bridge); kmm_free(bridge);
err0: err0:
return -1; return -1;
} }
+1 -1
View File
@@ -210,7 +210,7 @@ void up_release_stack(struct tcb_s *dtcb, uint8_t ttype)
/* Use the kernel allocator if this is a kernel thread */ /* Use the kernel allocator if this is a kernel thread */
if (ttype == TCB_FLAG_TTYPE_KERNEL) { if (ttype == TCB_FLAG_TTYPE_KERNEL) {
kfree(dtcb->stack_alloc_ptr); kmm_free(dtcb->stack_alloc_ptr);
} else } else
#endif #endif
{ {
+1 -1
View File
@@ -85,7 +85,7 @@ void *rtos_kmalloc(int size)
void rtos_kfree(void *addr) void rtos_kfree(void *addr)
{ {
kfree(addr); kmm_free(addr);
} }
/** /**
+3 -3
View File
@@ -202,7 +202,7 @@ static uart_dev_t *up_alloc_com(unsigned int base, int irq)
return dev; return dev;
err1: err1:
kfree(priv); kmm_free(priv);
err0: err0:
return NULL; return NULL;
} }
@@ -213,8 +213,8 @@ static uart_dev_t *up_alloc_com(unsigned int base, int irq)
static inline void up_free_com(uart_dev_t *com) static inline void up_free_com(uart_dev_t *com)
{ {
kfree(com->priv); kmm_free(com->priv);
kfree(com); kmm_free(com);
} }
/**************************************************************************** /****************************************************************************
+7 -7
View File
@@ -59,8 +59,8 @@
#ifdef VFAT_STANDALONE #ifdef VFAT_STANDALONE
# define sdbg(format, ...) printf(format, ##__VA_ARGS__) # define sdbg(format, ...) printf(format, ##__VA_ARGS__)
# define kmalloc(size) malloc(size) # define kmm_malloc(size) malloc(size)
# define kfree(mem) free(mem) # define kmm_free(mem) free(mem)
#endif #endif
/**************************************************************************** /****************************************************************************
@@ -231,7 +231,7 @@ char *up_deviceimage(void)
* to reallocate this a few times to get the size right. * to reallocate this a few times to get the size right.
*/ */
pbuffer = (char*)kmalloc(bufsize); pbuffer = (char*)kmm_malloc(bufsize);
/* Set up the input buffer */ /* Set up the input buffer */
@@ -260,7 +260,7 @@ char *up_deviceimage(void)
case Z_STREAM_ERROR: case Z_STREAM_ERROR:
sdbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" ); sdbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
(void)inflateEnd(&strm); (void)inflateEnd(&strm);
kfree(pbuffer); kmm_free(pbuffer);
return NULL; return NULL;
} }
@@ -275,7 +275,7 @@ char *up_deviceimage(void)
char *newbuffer = kmm_realloc(pbuffer, newbufsize); char *newbuffer = kmm_realloc(pbuffer, newbufsize);
if (!newbuffer) if (!newbuffer)
{ {
kfree(pbuffer); kmm_free(pbuffer);
return NULL; return NULL;
} }
else else
@@ -295,7 +295,7 @@ char *up_deviceimage(void)
char *newbuffer = kmm_realloc(pbuffer, newbufsize); char *newbuffer = kmm_realloc(pbuffer, newbufsize);
if (!newbuffer) if (!newbuffer)
{ {
kfree(pbuffer); kmm_free(pbuffer);
return NULL; return NULL;
} }
else else
@@ -351,7 +351,7 @@ int main(int argc, char **argv, char **envp)
if (deviceimage) if (deviceimage)
{ {
printf("Inflate SUCCEEDED\n"); printf("Inflate SUCCEEDED\n");
kfree(deviceimage); kmm_free(deviceimage);
return 0; return 0;
} }
else else