Skip to content

Commit

Permalink
sensor.c: Rename container_of to list_container_of
Browse files Browse the repository at this point in the history
apache#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 <[email protected]>
  • Loading branch information
JianyuWang0623 committed Sep 19, 2024
1 parent 1d3dd32 commit ddee6e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/sensors/usensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

/****************************************************************************
Expand Down

0 comments on commit ddee6e0

Please sign in to comment.