mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
drivers/rpmsg_port_spi: fix build error
CC: vfs/fs_unlink.c rpmsg/rpmsg_port_spi.c: In function ‘rpmsg_port_spi_complete_handler’:
rpmsg/rpmsg_port_spi.c:415:11: warning: implicit declaration of function ‘rpmsg_port_spi_drop_packets’; did you mean ‘rpmsg_port_drop_packets’? [-Wimplicit-function-declaration]
415 | rpmsg_port_spi_drop_packets(rpspi, RPMSG_PORT_SPI_DROP_ALL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| rpmsg_port_drop_packets
rpmsg/rpmsg_port_spi.c:415:46: error: ‘RPMSG_PORT_SPI_DROP_ALL’ undeclared (first use in this function); did you mean ‘RPMSG_PORT_DROP_ALL’?
415 | rpmsg_port_spi_drop_packets(rpspi, RPMSG_PORT_SPI_DROP_ALL);
| ^~~~~~~~~~~~~~~~~~~~~~~
| RPMSG_PORT_DROP_ALL
rpmsg/rpmsg_port_spi_slave.c:292:5: warning: implicit declaration of function ‘container_of’; did you mean ‘list_container_of’? [-Wimplicit-function-declaration]
292 | container_of(port, struct rpmsg_port_spi_s, port);
| ^~~~~~~~~~~~
| list_container_of
Signed-off-by: liaoao <liaoao@xiaomi.com>
This commit is contained in:
@@ -410,7 +410,7 @@ static void rpmsg_port_spi_complete_handler(FAR void *arg)
|
||||
if (rpspi->rxhdr->cmd == RPMSG_PORT_SPI_CMD_SHUTDOWN)
|
||||
{
|
||||
rpspi->state = RPMSG_PORT_SPI_STATE_DISCONNECTING;
|
||||
rpmsg_port_spi_drop_packets(rpspi, RPMSG_PORT_SPI_DROP_ALL);
|
||||
rpmsg_port_drop_packets(&rpspi->port, RPMSG_PORT_DROP_ALL);
|
||||
}
|
||||
|
||||
rpmsg_port_queue_add_buffer(&rpspi->port.rxq, rpspi->rxhdr);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <nuttx/crc16.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/kthread.h>
|
||||
#include <nuttx/nuttx.h>
|
||||
#include <nuttx/power/pm.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/mutex.h>
|
||||
|
||||
Reference in New Issue
Block a user