drivers: spi_sam: initialize tx and rx
initialize both tx and rx in the spi_sam0 driver. Make the spi_sam driver look the same by splitting the declaration into 2 lines. Discovered with gcc 8.2 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
f072a83391
commit
937e45de74
2 changed files with 4 additions and 3 deletions
|
@ -275,7 +275,8 @@ static void spi_sam_fast_transceive(struct device *dev,
|
|||
size_t tx_count = 0;
|
||||
size_t rx_count = 0;
|
||||
Spi *regs = cfg->regs;
|
||||
const struct spi_buf *tx = NULL, *rx = NULL;
|
||||
const struct spi_buf *tx = NULL;
|
||||
const struct spi_buf *rx = NULL;
|
||||
|
||||
if (tx_bufs) {
|
||||
tx = tx_bufs->buffers;
|
||||
|
|
|
@ -280,8 +280,8 @@ static void spi_sam0_fast_transceive(struct device *dev,
|
|||
size_t tx_count = 0;
|
||||
size_t rx_count = 0;
|
||||
SercomSpi *regs = cfg->regs;
|
||||
const struct spi_buf *tx;
|
||||
const struct spi_buf *rx;
|
||||
const struct spi_buf *tx = NULL;
|
||||
const struct spi_buf *rx = NULL;
|
||||
|
||||
if (tx_bufs) {
|
||||
tx = tx_bufs->buffers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue