summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-12-08 12:17:11 +0000
committerMark Brown <broonie@kernel.org>2014-12-08 12:17:11 +0000
commit19a0368028de2575ed562600888d856196ebfc05 (patch)
tree7721735ae4e7487234be1987da07af3c1d7fe2ee
parentc9508d4b3a0a37157fd2fbbac8caa56d7399600b (diff)
parent98a8f5a0538fe1a02a6a73a3451f1c093e30bdfc (diff)
downloadblackbird-op-linux-19a0368028de2575ed562600888d856196ebfc05.tar.gz
blackbird-op-linux-19a0368028de2575ed562600888d856196ebfc05.zip
Merge remote-tracking branch 'spi/topic/core' into spi-next
-rw-r--r--drivers/spi/spi.c2
-rw-r--r--include/linux/spi/spi.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 50f20f243981..da7e6225b8f6 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1001,7 +1001,7 @@ static int spi_init_queue(struct spi_master *master)
dev_name(&master->dev));
if (IS_ERR(master->kworker_task)) {
dev_err(&master->dev, "failed to create message pump task\n");
- return -ENOMEM;
+ return PTR_ERR(master->kworker_task);
}
init_kthread_work(&master->pump_messages, spi_pump_messages);
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 46d188a9947c..a6ef2a8e6de4 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -1049,4 +1049,10 @@ spi_unregister_device(struct spi_device *spi)
extern const struct spi_device_id *
spi_get_device_id(const struct spi_device *sdev);
+static inline bool
+spi_transfer_is_last(struct spi_master *master, struct spi_transfer *xfer)
+{
+ return list_is_last(&xfer->transfer_list, &master->cur_msg->transfers);
+}
+
#endif /* __LINUX_SPI_H */
OpenPOWER on IntegriCloud