aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>2016-04-05 14:07:54 -0400
committerMark Brown <broonie@kernel.org>2016-04-05 14:51:10 -0400
commit6fe9b67dbe5e0a0abeeabd428cb596b913995b36 (patch)
treef43d2d81f1124eb6e300aed76bf27f84face1517
parent2198b7483d4a89cf2cc710045c76a76dba573ea5 (diff)
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>
-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)
615 * This function disables the SPI controller and 615 * This function disables the SPI controller and
616 * changes the driver state to "suspend" 616 * changes the driver state to "suspend"
617 * 617 *
618 * Return: Always 0 618 * Return: 0 on success and error value on error
619 */ 619 */
620static int __maybe_unused cdns_spi_suspend(struct device *dev) 620static int __maybe_unused cdns_spi_suspend(struct device *dev)
621{ 621{
622 struct platform_device *pdev = to_platform_device(dev); 622 struct platform_device *pdev = to_platform_device(dev);
623 struct spi_master *master = platform_get_drvdata(pdev); 623 struct spi_master *master = platform_get_drvdata(pdev);
624 624
625 spi_master_suspend(master); 625 return spi_master_suspend(master);
626
627 return 0;
628} 626}
629 627
630/** 628/**
@@ -640,9 +638,7 @@ static int __maybe_unused cdns_spi_resume(struct device *dev)
640 struct platform_device *pdev = to_platform_device(dev); 638 struct platform_device *pdev = to_platform_device(dev);
641 struct spi_master *master = platform_get_drvdata(pdev); 639 struct spi_master *master = platform_get_drvdata(pdev);
642 640
643 spi_master_resume(master); 641 return spi_master_resume(master);
644
645 return 0;
646} 642}
647 643
648/** 644/**