spi: Do not print a message if spi_controller_{suspend,resume}() fails
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 5 Sep 2018 08:51:57 +0000 (10:51 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 5 Sep 2018 11:38:27 +0000 (12:38 +0100)
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>
drivers/spi/spi-atmel.c
drivers/spi/spi-dw.c
drivers/spi/spi-fsl-espi.c
drivers/spi/spi-pl022.c
drivers/spi/spi-pxa2xx.c

index 3f890d16293411ba86618d54d4f8f70887aec31d..74fddcd3282b4beaf6fabaf85e0b96d139ee5309 100644 (file)
@@ -1767,10 +1767,8 @@ static int atmel_spi_suspend(struct device *dev)
 
        /* Stop the queue running */
        ret = spi_master_suspend(master);
-       if (ret) {
-               dev_warn(dev, "cannot suspend master\n");
+       if (ret)
                return ret;
-       }
 
        if (!pm_runtime_suspended(dev))
                atmel_spi_runtime_suspend(dev);
@@ -1799,11 +1797,7 @@ static int atmel_spi_resume(struct device *dev)
        }
 
        /* Start the queue running */
-       ret = spi_master_resume(master);
-       if (ret)
-               dev_err(dev, "problem starting queue (%d)\n", ret);
-
-       return ret;
+       return spi_master_resume(master);
 }
 #endif
 
index ac2eb89ef7a5a0616fe915ec96453ac441f589be..1736612ee86be7ddbfa10f1a9e0babfce1dcd817 100644 (file)
@@ -572,13 +572,8 @@ EXPORT_SYMBOL_GPL(dw_spi_suspend_host);
 
 int dw_spi_resume_host(struct dw_spi *dws)
 {
-       int ret;
-
        spi_hw_init(&dws->master->dev, dws);
-       ret = spi_controller_resume(dws->master);
-       if (ret)
-               dev_err(&dws->master->dev, "fail to start queue (%d)\n", ret);
-       return ret;
+       return spi_controller_resume(dws->master);
 }
 EXPORT_SYMBOL_GPL(dw_spi_resume_host);
 
index 1e8ff6256079f1344e5e6a1ceb2192d620bf0d5b..cf2118dc91f445489318f8a2cb5e9e7ed861ec35 100644 (file)
@@ -798,10 +798,8 @@ static int of_fsl_espi_suspend(struct device *dev)
        int ret;
 
        ret = spi_master_suspend(master);
-       if (ret) {
-               dev_warn(dev, "cannot suspend master\n");
+       if (ret)
                return ret;
-       }
 
        return pm_runtime_force_suspend(dev);
 }
index 1af8c96b940e203dfabf0b270ad46267b4308e12..5f5f197b153c3ec4b669640fa95f8803344e0b8d 100644 (file)
@@ -2325,10 +2325,8 @@ static int pl022_suspend(struct device *dev)
        int ret;
 
        ret = spi_master_suspend(pl022->master);
-       if (ret) {
-               dev_warn(dev, "cannot suspend master\n");
+       if (ret)
                return ret;
-       }
 
        ret = pm_runtime_force_suspend(dev);
        if (ret) {
@@ -2353,9 +2351,7 @@ static int pl022_resume(struct device *dev)
 
        /* Start the queue running */
        ret = spi_master_resume(pl022->master);
-       if (ret)
-               dev_err(dev, "problem starting queue (%d)\n", ret);
-       else
+       if (!ret)
                dev_dbg(dev, "resumed\n");
 
        return ret;
index 14f4ea59caff7a235faafc7c5cfb91776bcc68a9..e3cbc66a7061b42f7a76fb00b983427c9d84981f 100644 (file)
@@ -1808,13 +1808,7 @@ static int pxa2xx_spi_resume(struct device *dev)
                lpss_ssp_setup(drv_data);
 
        /* Start the queue running */
-       status = spi_controller_resume(drv_data->master);
-       if (status != 0) {
-               dev_err(dev, "problem starting queue (%d)\n", status);
-               return status;
-       }
-
-       return 0;
+       return spi_controller_resume(drv_data->master);
 }
 #endif