summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-02-27 17:34:15 +0200
committerMark Brown <broonie@kernel.org>2015-03-06 19:41:56 +0000
commitb716c4ffc6a2b0bfbcf9619880f335be11b65708 (patch)
treee9fce46a5b9a33fcfc9593763b78f6bc46c787ea /drivers
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
spi: introduce master->handle_err() callback
This callback would be useful to handle an error that occurs in the generic implementation of transfer_one_message(). The good candidate for this is to drain FIFO and / or to terminate DMA transfers when timeout happened. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index c64a3e59fce3..31d4d9d997e2 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -851,6 +851,9 @@ out:
if (msg->status == -EINPROGRESS)
msg->status = ret;
+ if (msg->status)
+ master->handle_err(master, msg);
+
spi_finalize_current_message(master);
return ret;