diff options
author | Mark Brown <broonie@kernel.org> | 2019-05-23 14:47:04 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-23 14:47:04 +0100 |
commit | d9424d6d48c8b6c4e8d9c38e2565bcaf90f4d184 (patch) | |
tree | ed32b926f555a59d7633f63a69e890ba190b760e /drivers/spi | |
parent | 0e896f380b845d3fb889f27eb6026cd494bb3cd8 (diff) | |
parent | f3440d9a0da292dc4998d9393162fcfb996fd671 (diff) | |
download | linux-d9424d6d48c8b6c4e8d9c38e2565bcaf90f4d184.tar.gz linux-d9424d6d48c8b6c4e8d9c38e2565bcaf90f4d184.tar.bz2 linux-d9424d6d48c8b6c4e8d9c38e2565bcaf90f4d184.zip |
Merge branch 'spi-5.2' into spi-5.3
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-bitbang.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi-fsl-spi.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi.c | 11 |
3 files changed, 10 insertions, 5 deletions
diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c index 4243e53f9f7b..e8fd95276315 100644 --- a/drivers/spi/spi-bitbang.c +++ b/drivers/spi/spi-bitbang.c @@ -415,7 +415,7 @@ int spi_bitbang_start(struct spi_bitbang *bitbang) if (ret) spi_master_put(master); - return 0; + return ret; } EXPORT_SYMBOL_GPL(spi_bitbang_start); diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index b36ac6aa3b1f..7fbdaf066719 100644 --- a/drivers/spi/spi-fsl-spi.c +++ b/drivers/spi/spi-fsl-spi.c @@ -432,7 +432,6 @@ static int fsl_spi_do_one_msg(struct spi_master *master, } m->status = status; - spi_finalize_current_message(master); if (status || !cs_change) { ndelay(nsecs); @@ -440,6 +439,7 @@ static int fsl_spi_do_one_msg(struct spi_master *master, } fsl_spi_setup_transfer(spi, NULL); + spi_finalize_current_message(master); return 0; } diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index e9bf0c23da50..232ed4bb8fca 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1229,10 +1229,10 @@ out: if (msg->status && ctlr->handle_err) ctlr->handle_err(ctlr, msg); - spi_finalize_current_message(ctlr); - spi_res_release(ctlr, msg); + spi_finalize_current_message(ctlr); + return ret; } @@ -1355,10 +1355,15 @@ static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread) ret = ctlr->prepare_transfer_hardware(ctlr); if (ret) { dev_err(&ctlr->dev, - "failed to prepare transfer hardware\n"); + "failed to prepare transfer hardware: %d\n", + ret); if (ctlr->auto_runtime_pm) pm_runtime_put(ctlr->dev.parent); + + ctlr->cur_msg->status = ret; + spi_finalize_current_message(ctlr); + mutex_unlock(&ctlr->io_mutex); return; } |