spi_handlers: fix some build issues
Needed string.h for memset, and the spi bufs are const. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
3772f77119
commit
375e8d73ce
1 changed files with 3 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <spi.h>
|
||||
#include <syscall_handler.h>
|
||||
#include <string.h>
|
||||
|
||||
/* This assumes that bufs and buf_copy are copies from the values passed
|
||||
* as syscall arguments.
|
||||
|
@ -24,7 +25,7 @@ static void copy_and_check(struct spi_buf_set *bufs,
|
|||
/* Validate the array of struct spi_buf instances */
|
||||
Z_OOPS(Z_SYSCALL_MEMORY_ARRAY_READ(bufs->buffers,
|
||||
bufs->count,
|
||||
sizeof(struct spi_buf)));;
|
||||
sizeof(struct spi_buf)));
|
||||
|
||||
/* Not worried abuot overflow here: _SYSCALL_MEMORY_ARRAY_READ()
|
||||
* takes care of it.
|
||||
|
@ -37,7 +38,7 @@ static void copy_and_check(struct spi_buf_set *bufs,
|
|||
/* Now for each array element, validate the memory buffers
|
||||
* that they point to
|
||||
*/
|
||||
struct spi_buf *buf = &bufs->buffers[i];
|
||||
const struct spi_buf *buf = &bufs->buffers[i];
|
||||
|
||||
Z_OOPS(Z_SYSCALL_MEMORY(buf->buf, buf->len, writable));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue