diff options
author | Ingo Molnar <mingo@kernel.org> | 2020-11-07 13:18:49 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-11-07 13:18:49 +0100 |
commit | 0a986ea81e1aa8ac17e82cda53cc95158217956e (patch) | |
tree | a054b0ef413b7f327c04137c5768b2da6488511d /drivers/spi/spi.c | |
parent | kprobes: Replace rp->free_instance with freelist (diff) | |
parent | kprobes: Init kprobes in early_initcall (diff) | |
download | linux-dev-0a986ea81e1aa8ac17e82cda53cc95158217956e.tar.xz linux-dev-0a986ea81e1aa8ac17e82cda53cc95158217956e.zip |
Merge branch 'linus' into perf/kprobes
Merge recent kprobes updates into perf/kprobes that came from -mm.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index dc12af018350..0cab239d8e7f 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1327,8 +1327,6 @@ out: if (msg->status && ctlr->handle_err) ctlr->handle_err(ctlr, msg); - spi_res_release(ctlr, msg); - spi_finalize_current_message(ctlr); return ret; @@ -1725,6 +1723,13 @@ void spi_finalize_current_message(struct spi_controller *ctlr) spi_unmap_msg(ctlr, mesg); + /* In the prepare_messages callback the spi bus has the opportunity to + * split a transfer to smaller chunks. + * Release splited transfers here since spi_map_msg is done on the + * splited transfers. + */ + spi_res_release(ctlr, mesg); + if (ctlr->cur_msg_prepared && ctlr->unprepare_message) { ret = ctlr->unprepare_message(ctlr, mesg); if (ret) { |