Kernel module should prefer functions with nx/kmm prefix

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-05-02 22:30:58 +08:00
committed by Alin Jerpelea
parent 15480e51cf
commit 0536953ded
52 changed files with 207 additions and 262 deletions
+2 -1
View File
@@ -31,9 +31,10 @@
#include <stdbool.h>
#include <stdint.h>
#include <semaphore.h>
#include <fixedmath.h>
#include <nuttx/semaphore.h>
#ifdef CONFIG_BATTERY_MONITOR
/****************************************************************************
+1 -1
View File
@@ -82,7 +82,7 @@ struct i2c_master_s;
* Or, if using dynamic memory allocation and I2C:
*
* struct mpu_config_s* mpuc;
* mpuc = malloc(sizeof(*mpuc));
* mpuc = kmm_malloc(sizeof(*mpuc));
* memset(mpuc, 0, sizeof(*mpuc)); * sets spi to NULL, if present *
* mpuc.i2c = ...;
*
+2 -2
View File
@@ -89,8 +89,8 @@
# define EP_ALLOCBUFFER(ep,nb) (ep)->ops->allocbuffer(ep,nb)
# define EP_FREEBUFFER(ep,buf) (ep)->ops->freebuffer(ep,buf)
#else
# define EP_ALLOCBUFFER(ep,nb) malloc(nb)
# define EP_FREEBUFFER(ep,buf) free(buf)
# define EP_ALLOCBUFFER(ep,nb) kmm_malloc(nb)
# define EP_FREEBUFFER(ep,buf) kmm_free(buf)
#endif
/* Submit an I/O request to the endpoint */