Skip to content

Commit

Permalink
spi: rspi: Remove set_config_register() macro
Browse files Browse the repository at this point in the history
The set_config_register() macro is used in a single place.
Make the code easier to read by just removing it.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200102133822.29346-5-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Geert Uytterhoeven authored and Mark Brown committed Jan 7, 2020
1 parent 1bec84d commit 8f2344f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/spi/spi-rspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,6 @@ static int qspi_set_receive_trigger(struct rspi_data *rspi, unsigned int len)
return n;
}

#define set_config_register(spi, n) spi->ops->set_config_register(spi, n)

static void rspi_enable_irq(const struct rspi_data *rspi, u8 enable)
{
rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) | enable, RSPI_SPCR);
Expand Down Expand Up @@ -940,7 +938,7 @@ static int rspi_prepare_message(struct spi_controller *ctlr,
if (spi->mode & SPI_LOOP)
rspi->sppcr |= SPPCR_SPLP;

set_config_register(rspi, 8);
rspi->ops->set_config_register(rspi, 8);

if (msg->spi->mode &
(SPI_TX_DUAL | SPI_TX_QUAD | SPI_RX_DUAL | SPI_RX_QUAD)) {
Expand Down

0 comments on commit 8f2344f

Please sign in to comment.