spi: rspi: Use DUMMY_DATA macro instead of hardcoded value
authorGeert Uytterhoeven <geert+renesas@linux-m68k.org>
Tue, 24 Dec 2013 09:49:33 +0000 (10:49 +0100)
committerMark Brown <broonie@linaro.org>
Tue, 24 Dec 2013 13:19:55 +0000 (13:19 +0000)
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>
drivers/spi/spi-rspi.c

index aea0c62b095dcc0ef658528d6ea1c98b019b6d92..d7920d95a03c19cf11c4db64c1fb6e73cfd2e074 100644 (file)
 #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,