summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@linux-m68k.org>2013-12-24 10:49:33 +0100
committerMark Brown <broonie@linaro.org>2013-12-24 14:19:55 +0100
commit2aae80b27da6904939ed38959ee3d153f27ee7d1 (patch)
treeaaddb3ea1bd09bd5c837e80a204f5052c9ff7d19 /drivers/spi
parentspi: rspi: Make more pointers const (diff)
downloadlinux-2aae80b27da6904939ed38959ee3d153f27ee7d1.tar.xz
linux-2aae80b27da6904939ed38959ee3d153f27ee7d1.zip
spi: rspi: Use DUMMY_DATA macro instead of hardcoded value
Make it more obvious that this value is dummy data. Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to '')
-rw-r--r--drivers/spi/spi-rspi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index aea0c62b095d..d7920d95a03c 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -149,6 +149,8 @@
#define SPBFCR_TXRST 0x80 /* qspi only */
#define SPBFCR_RXRST 0x40 /* qspi only */
+#define DUMMY_DATA 0x00
+
struct rspi_data {
void __iomem *addr;
u32 max_speed_hz;
@@ -541,7 +543,7 @@ static int rspi_receive_pio(struct rspi_data *rspi, struct spi_message *mesg,
return -ETIMEDOUT;
}
/* dummy write for generate clock */
- rspi_write16(rspi, 0x00, RSPI_SPDR);
+ rspi_write16(rspi, DUMMY_DATA, RSPI_SPDR);
if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
dev_err(&rspi->master->dev,
@@ -586,7 +588,7 @@ static int qspi_receive_pio(struct rspi_data *rspi, struct spi_message *mesg,
return -ETIMEDOUT;
}
/* dummy write for generate clock */
- rspi_write8(rspi, 0x00, RSPI_SPDR);
+ rspi_write8(rspi, DUMMY_DATA, RSPI_SPDR);
if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
dev_err(&rspi->master->dev,