Skip to content

Commit

Permalink
spi: atmel-quadspi: void return type for atmel_qspi_init()
Browse files Browse the repository at this point in the history
commit 2d30ac5 ("mtd: spi-nor: atmel-quadspi: Use spi-mem interface for atmel-quadspi driver")
removed the error path from atmel_qspi_init(), but not changed the
function's return type. Set void return type for atmel_qspi_init().

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Tudor Ambarus authored and Mark Brown committed Jul 2, 2019
1 parent 23cdddb commit 5b74e9a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions drivers/spi/atmel-quadspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ static int atmel_qspi_setup(struct spi_device *spi)
return 0;
}

static int atmel_qspi_init(struct atmel_qspi *aq)
static void atmel_qspi_init(struct atmel_qspi *aq)
{
/* Reset the QSPI controller */
writel_relaxed(QSPI_CR_SWRST, aq->regs + QSPI_CR);
Expand All @@ -416,8 +416,6 @@ static int atmel_qspi_init(struct atmel_qspi *aq)

/* Enable the QSPI controller */
writel_relaxed(QSPI_CR_QSPIEN, aq->regs + QSPI_CR);

return 0;
}

static irqreturn_t atmel_qspi_interrupt(int irq, void *dev_id)
Expand Down Expand Up @@ -536,9 +534,7 @@ static int atmel_qspi_probe(struct platform_device *pdev)
if (err)
goto disable_qspick;

err = atmel_qspi_init(aq);
if (err)
goto disable_qspick;
atmel_qspi_init(aq);

err = spi_register_controller(ctrl);
if (err)
Expand Down Expand Up @@ -587,7 +583,8 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev)
clk_prepare_enable(aq->pclk);
clk_prepare_enable(aq->qspick);

return atmel_qspi_init(aq);
atmel_qspi_init(aq);
return 0;
}

static SIMPLE_DEV_PM_OPS(atmel_qspi_pm_ops, atmel_qspi_suspend,
Expand Down

0 comments on commit 5b74e9a

Please sign in to comment.