From: <Tudor.Ambarus@microchip.com>
To: <broonie@kernel.org>, <mdeneen@gmail.com>
Cc: alexandre.belloni@bootlin.com, Tudor.Ambarus@microchip.com,
linux-spi@vger.kernel.org, Ludovic.Desroches@microchip.com,
Claudiu.Beznea@microchip.com,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] spi: atmel-quadspi: void return type for atmel_qspi_init()
Date: Fri, 28 Jun 2019 15:30:32 +0000 [thread overview]
Message-ID: <20190628153009.7571-2-tudor.ambarus@microchip.com> (raw)
In-Reply-To: <20190628153009.7571-1-tudor.ambarus@microchip.com>
From: Tudor Ambarus <tudor.ambarus@microchip.com>
commit 2d30ac5ed633 ("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>
---
drivers/spi/atmel-quadspi.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index 9f24d5f0b431..32eb7447c31a 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -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);
@@ -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)
@@ -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)
@@ -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,
--
2.9.5
next prev parent reply other threads:[~2019-06-28 15:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 15:30 [PATCH 0/2] spi: atmel-quadspi: fix resume call Tudor.Ambarus
2019-06-28 15:30 ` Tudor.Ambarus [this message]
2019-07-02 13:04 ` Applied "spi: atmel-quadspi: void return type for atmel_qspi_init()" to the spi tree Mark Brown
2019-06-28 15:30 ` [PATCH 2/2] spi: atmel-quadspi: fix resume call Tudor.Ambarus
2019-07-02 13:04 ` Applied "spi: atmel-quadspi: fix resume call" to the spi tree Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190628153009.7571-2-tudor.ambarus@microchip.com \
--to=tudor.ambarus@microchip.com \
--cc=Claudiu.Beznea@microchip.com \
--cc=Ludovic.Desroches@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=mdeneen@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).