spi: mediatek: remove needless pair of writel()/readl()
authorleilk.liu@mediatek.com <leilk.liu@mediatek.com>
Fri, 20 Nov 2015 02:21:18 +0000 (10:21 +0800)
committerMark Brown <broonie@kernel.org>
Sat, 21 Nov 2015 13:39:27 +0000 (13:39 +0000)
It's not need to re-read and re-write SPI_CMD_REG, so remove it.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mt65xx.c

index 563954a614242718bd125f16f9a3549f783346b8..2b3fcb8ca32518b29059615b7ee3b18e396c5f3c 100644 (file)
@@ -154,9 +154,6 @@ static int mtk_spi_prepare_message(struct spi_master *master,
                reg_val |= SPI_CMD_CPOL;
        else
                reg_val &= ~SPI_CMD_CPOL;
-       writel(reg_val, mdata->base + SPI_CMD_REG);
-
-       reg_val = readl(mdata->base + SPI_CMD_REG);
 
        /* set the mlsbx and mlsbtx */
        if (chip_config->tx_mlsb)