Skip to content

Commit 5b74e9a

Browse files
ambarusbroonie
authored andcommitted
spi: atmel-quadspi: void return type for atmel_qspi_init()
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 23cdddb commit 5b74e9a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

drivers/spi/atmel-quadspi.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ static int atmel_qspi_setup(struct spi_device *spi)
405405
return 0;
406406
}
407407

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

417417
/* Enable the QSPI controller */
418418
writel_relaxed(QSPI_CR_QSPIEN, aq->regs + QSPI_CR);
419-
420-
return 0;
421419
}
422420

423421
static irqreturn_t atmel_qspi_interrupt(int irq, void *dev_id)
@@ -536,9 +534,7 @@ static int atmel_qspi_probe(struct platform_device *pdev)
536534
if (err)
537535
goto disable_qspick;
538536

539-
err = atmel_qspi_init(aq);
540-
if (err)
541-
goto disable_qspick;
537+
atmel_qspi_init(aq);
542538

543539
err = spi_register_controller(ctrl);
544540
if (err)
@@ -587,7 +583,8 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev)
587583
clk_prepare_enable(aq->pclk);
588584
clk_prepare_enable(aq->qspick);
589585

590-
return atmel_qspi_init(aq);
586+
atmel_qspi_init(aq);
587+
return 0;
591588
}
592589

593590
static SIMPLE_DEV_PM_OPS(atmel_qspi_pm_ops, atmel_qspi_suspend,

0 commit comments

Comments
 (0)