From a08b8f94c013d2359a17759202b5da389cbb25ff Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 3 Jul 2015 14:36:56 -0600 Subject: [PATCH] PIC32 SPI: Fix some backward conditional compilation --- arch/mips/src/pic32mx/pic32mx-spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/mips/src/pic32mx/pic32mx-spi.c b/arch/mips/src/pic32mx/pic32mx-spi.c index f00cb23d7d..2a13e5e878 100644 --- a/arch/mips/src/pic32mx/pic32mx-spi.c +++ b/arch/mips/src/pic32mx/pic32mx-spi.c @@ -65,7 +65,7 @@ ****************************************************************************/ /* Configuration */ -#ifndef CONFIG_SPI_EXCHANGE +#ifdef CONFIG_SPI_EXCHANGE /* See arch/mips/src/pic32mz/pic32mz-spi.c for an implementation */ # error CONFIG_SPI_EXCHANGE not supported by this driver @@ -812,6 +812,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size /* Read from the buffer register to clear the status bit */ regval = spi_getreg(priv, PIC32MX_SPI_BUF_OFFSET); + UNUSED(regval); nwords--; } }