sensor.c: Rename container_of to list_container_of

https://github.com/apache/nuttx/pull/11805

Log:
    /github/workspace/sources/nuttx/drivers/sensors/usensor.c: In function 'usensor_get_info':
    Warning: /github/workspace/sources/nuttx/drivers/sensors/usensor.c:228:44: warning: implicit declaration of function 'container_of'; did you mean 'list_container_of'? [-Wimplicit-function-declaration]
      228 |   FAR struct usensor_lowerhalf_s *ulower = container_of(lower,
          |                                            ^~~~~~~~~~~~
          |                                            list_container_of
    Error: /github/workspace/sources/nuttx/drivers/sensors/usensor.c:229:44: error: expected expression before 'struct'
      229 |                                            struct usensor_lowerhalf_s,
          |                                            ^~~~~~
    /github/workspace/sources/nuttx/drivers/sensors/usensor.c: In function 'usensor_control':
    Error: /github/workspace/sources/nuttx/drivers/sensors/usensor.c:241:44: error: expected expression before 'struct'
      241 |                                            struct usensor_lowerhalf_s,
          |                                            ^~~~~~

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3 2024-09-19 10:02:15 +08:00 committed by Xiang Xiao
parent 71876ae098
commit d2b58a520e

View File

@ -27,6 +27,7 @@
#include <nuttx/list.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mutex.h>
#include <nuttx/nuttx.h>
#include <nuttx/sensors/sensor.h>
/****************************************************************************