summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-cadence.c
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>2016-04-05 23:37:54 +0530
committerMark Brown <broonie@kernel.org>2016-04-05 11:51:10 -0700
commit6fe9b67dbe5e0a0abeeabd428cb596b913995b36 (patch)
treef43d2d81f1124eb6e300aed76bf27f84face1517 /drivers/spi/spi-cadence.c
parent2198b7483d4a89cf2cc710045c76a76dba573ea5 (diff)
downloadlinux-6fe9b67dbe5e0a0abeeabd428cb596b913995b36.tar.bz2
spi: cadence: Return the error code for cdns_spi_suspend and cdns_spi_resume
Return the error code for cdns_spi_suspend and cdns_spi_resume. Also fixes a comment where which claims that the error code is returned. Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-cadence.c')
-rw-r--r--drivers/spi/spi-cadence.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index d0cdd1801e9e..07481e12d8a3 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -615,16 +615,14 @@ static int cdns_spi_remove(struct platform_device *pdev)
* This function disables the SPI controller and
* changes the driver state to "suspend"
*
- * Return: Always 0
+ * Return: 0 on success and error value on error
*/
static int __maybe_unused cdns_spi_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct spi_master *master = platform_get_drvdata(pdev);
- spi_master_suspend(master);
-
- return 0;
+ return spi_master_suspend(master);
}
/**
@@ -640,9 +638,7 @@ static int __maybe_unused cdns_spi_resume(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct spi_master *master = platform_get_drvdata(pdev);
- spi_master_resume(master);
-
- return 0;
+ return spi_master_resume(master);
}
/**