summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2018-09-05 04:51:57 -0400
committerMark Brown <broonie@kernel.org>2018-09-05 07:38:27 -0400
commit7c5d8a249acadc3e9d5af643c0fe24b608a98269 (patch)
treef5b8e95d463efa0ad7a704f85397bd8941203278
parent35386dfd13b746daf36a393bdf066dbe9b9b7aed (diff)
spi: Do not print a message if spi_controller_{suspend,resume}() fails
spi_controller_{suspend,resume}() already prints an error message on failure, so there is no need to repeat this in individual drivers. Note: spi_master_{suspend,resume}() is an alias for spi_controller_{suspend,resume}(). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by: Daniel Mack <daniel@zonque.org> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-atmel.c10
-rw-r--r--drivers/spi/spi-dw.c7
-rw-r--r--drivers/spi/spi-fsl-espi.c4
-rw-r--r--drivers/spi/spi-pl022.c8
-rw-r--r--drivers/spi/spi-pxa2xx.c8
5 files changed, 7 insertions, 30 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 3f890d162934..74fddcd3282b 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1767,10 +1767,8 @@ static int atmel_spi_suspend(struct device *dev)
1767 1767
1768 /* Stop the queue running */ 1768 /* Stop the queue running */
1769 ret = spi_master_suspend(master); 1769 ret = spi_master_suspend(master);
1770 if (ret) { 1770 if (ret)
1771 dev_warn(dev, "cannot suspend master\n");
1772 return ret; 1771 return ret;
1773 }
1774 1772
1775 if (!pm_runtime_suspended(dev)) 1773 if (!pm_runtime_suspended(dev))
1776 atmel_spi_runtime_suspend(dev); 1774 atmel_spi_runtime_suspend(dev);
@@ -1799,11 +1797,7 @@ static int atmel_spi_resume(struct device *dev)
1799 } 1797 }
1800 1798
1801 /* Start the queue running */ 1799 /* Start the queue running */
1802 ret = spi_master_resume(master); 1800 return spi_master_resume(master);
1803 if (ret)
1804 dev_err(dev, "problem starting queue (%d)\n", ret);
1805
1806 return ret;
1807} 1801}
1808#endif 1802#endif
1809 1803
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index ac2eb89ef7a5..1736612ee86b 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -572,13 +572,8 @@ EXPORT_SYMBOL_GPL(dw_spi_suspend_host);
572 572
573int dw_spi_resume_host(struct dw_spi *dws) 573int dw_spi_resume_host(struct dw_spi *dws)
574{ 574{
575 int ret;
576
577 spi_hw_init(&dws->master->dev, dws); 575 spi_hw_init(&dws->master->dev, dws);
578 ret = spi_controller_resume(dws->master); 576 return spi_controller_resume(dws->master);
579 if (ret)
580 dev_err(&dws->master->dev, "fail to start queue (%d)\n", ret);
581 return ret;
582} 577}
583EXPORT_SYMBOL_GPL(dw_spi_resume_host); 578EXPORT_SYMBOL_GPL(dw_spi_resume_host);
584 579
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index 1e8ff6256079..cf2118dc91f4 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -798,10 +798,8 @@ static int of_fsl_espi_suspend(struct device *dev)
798 int ret; 798 int ret;
799 799
800 ret = spi_master_suspend(master); 800 ret = spi_master_suspend(master);
801 if (ret) { 801 if (ret)
802 dev_warn(dev, "cannot suspend master\n");
803 return ret; 802 return ret;
804 }
805 803
806 return pm_runtime_force_suspend(dev); 804 return pm_runtime_force_suspend(dev);
807} 805}
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 1af8c96b940e..5f5f197b153c 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2325,10 +2325,8 @@ static int pl022_suspend(struct device *dev)
2325 int ret; 2325 int ret;
2326 2326
2327 ret = spi_master_suspend(pl022->master); 2327 ret = spi_master_suspend(pl022->master);
2328 if (ret) { 2328 if (ret)
2329 dev_warn(dev, "cannot suspend master\n");
2330 return ret; 2329 return ret;
2331 }
2332 2330
2333 ret = pm_runtime_force_suspend(dev); 2331 ret = pm_runtime_force_suspend(dev);
2334 if (ret) { 2332 if (ret) {
@@ -2353,9 +2351,7 @@ static int pl022_resume(struct device *dev)
2353 2351
2354 /* Start the queue running */ 2352 /* Start the queue running */
2355 ret = spi_master_resume(pl022->master); 2353 ret = spi_master_resume(pl022->master);
2356 if (ret) 2354 if (!ret)
2357 dev_err(dev, "problem starting queue (%d)\n", ret);
2358 else
2359 dev_dbg(dev, "resumed\n"); 2355 dev_dbg(dev, "resumed\n");
2360 2356
2361 return ret; 2357 return ret;
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 14f4ea59caff..e3cbc66a7061 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1808,13 +1808,7 @@ static int pxa2xx_spi_resume(struct device *dev)
1808 lpss_ssp_setup(drv_data); 1808 lpss_ssp_setup(drv_data);
1809 1809
1810 /* Start the queue running */ 1810 /* Start the queue running */
1811 status = spi_controller_resume(drv_data->master); 1811 return spi_controller_resume(drv_data->master);
1812 if (status != 0) {
1813 dev_err(dev, "problem starting queue (%d)\n", status);
1814 return status;
1815 }
1816
1817 return 0;
1818} 1812}
1819#endif 1813#endif
1820 1814