From: Mark Brown Date: Fri, 30 Sep 2016 16:14:10 +0000 (-0700) Subject: Merge remote-tracking branches 'spi/topic/fsl-espi', 'spi/topic/imx', 'spi/topic... X-Git-Tag: v4.9-rc1~139^2~3 X-Git-Url: http://git.cascardo.info/?p=cascardo%2Flinux.git;a=commitdiff_plain;h=e2df04ed3be123fb53740303779e13748b9f8b65 Merge remote-tracking branches 'spi/topic/fsl-espi', 'spi/topic/imx', 'spi/topic/jcore', 'spi/topic/loopback' and 'spi/topic/meson' into spi-next --- e2df04ed3be123fb53740303779e13748b9f8b65 diff --cc include/linux/spi/spi.h index 74278c7d0f52,f2d3960cc3c3,072cb2aa2413,072cb2aa2413,072cb2aa2413,072cb2aa2413..4b743ac35396 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@@@@@@ -1045,8 -1041,35 -1024,35 -1024,35 -1024,35 -1024,35 +1062,8 @@@@@@@ spi_read(struct spi_device *spi, void * .rx_buf = buf, .len = len, }; ----- struct spi_message m; ---- ---- spi_message_init(&m); ---- spi_message_add_tail(&t, &m); ---- return spi_sync(spi, &m); ----} - spi_message_init(&m); - spi_message_add_tail(&t, &m); - return spi_sync(spi, &m); - } - -----/** ----- * spi_sync_transfer - synchronous SPI data transfer ----- * @spi: device with which data will be exchanged ----- * @xfers: An array of spi_transfers ----- * @num_xfers: Number of items in the xfer array ----- * Context: can sleep ----- * ----- * Does a synchronous SPI data transfer of the given spi_transfer array. ----- * ----- * For more specific semantics see spi_sync(). ----- * ----- * Return: Return: zero on success, else a negative error code. ----- */ -----static inline int -----spi_sync_transfer(struct spi_device *spi, struct spi_transfer *xfers, ----- unsigned int num_xfers) -----{ ----- struct spi_message msg; ----- ----- spi_message_init_with_transfers(&msg, xfers, num_xfers); ----- ----- return spi_sync(spi, &msg); +++++ return spi_sync_transfer(spi, &t, 1); } /* this copies txbuf and rxbuf data; for small transfers only! */