diff options
author | Wolfgang Denk <wd@denx.de> | 2008-07-03 22:39:21 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-07-03 22:39:21 +0200 |
commit | ced209c50e80c25f13c083099b05044048d21f4f (patch) | |
tree | 731c3e73a8799ca1e580ffbdb5bc7ab9b56d3f03 | |
parent | 4ff170a8180a79da4cdaab1b30d58cd7b6be565e (diff) | |
download | u-boot-imx-ced209c50e80c25f13c083099b05044048d21f4f.zip u-boot-imx-ced209c50e80c25f13c083099b05044048d21f4f.tar.gz u-boot-imx-ced209c50e80c25f13c083099b05044048d21f4f.tar.bz2 |
sacsng board: fix warnings "suggest explicit braces to avoid ambiguous 'else'"
Signed-off-by: Wolfgang Denk <wd@denx.de>
-rw-r--r-- | include/configs/sacsng.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/configs/sacsng.h b/include/configs/sacsng.h index 4974fb4..2a398e8 100644 --- a/include/configs/sacsng.h +++ b/include/configs/sacsng.h @@ -272,10 +272,14 @@ #undef SPI_INIT /* no port initialization needed */ #define SPI_READ ((immr->im_ioport.iop_pdatd & I2C_MISO) != 0) -#define SPI_SDA(bit) if(bit) immr->im_ioport.iop_pdatd |= I2C_MOSI; \ - else immr->im_ioport.iop_pdatd &= ~I2C_MOSI -#define SPI_SCL(bit) if(bit) immr->im_ioport.iop_pdatd |= I2C_SCLK; \ - else immr->im_ioport.iop_pdatd &= ~I2C_SCLK +#define SPI_SDA(bit) do { \ + if(bit) immr->im_ioport.iop_pdatd |= I2C_MOSI; \ + else immr->im_ioport.iop_pdatd &= ~I2C_MOSI; \ + } while (0) +#define SPI_SCL(bit) do { \ + if(bit) immr->im_ioport.iop_pdatd |= I2C_SCLK; \ + else immr->im_ioport.iop_pdatd &= ~I2C_SCLK; \ + } while (0) #define SPI_DELAY /* No delay is needed */ #endif /* CONFIG_SOFT_SPI */ |