diff options
author | Olof Johansson <olof@lixom.net> | 2017-04-19 05:21:35 -0700 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2017-04-19 05:21:35 -0700 |
commit | be6beaa8d1a89616df6cbf31a3b0adbf15b2fa55 (patch) | |
tree | feae495846cd55304d78198f478635ea6be9ae40 /drivers/firmware | |
parent | 3ed0b8a76a6dc4158d7ba1ab7297a0477f7ea31d (diff) | |
parent | c511fa3f35e30982445fae2946f4aade3f42203d (diff) | |
download | linux-be6beaa8d1a89616df6cbf31a3b0adbf15b2fa55.tar.gz linux-be6beaa8d1a89616df6cbf31a3b0adbf15b2fa55.tar.bz2 linux-be6beaa8d1a89616df6cbf31a3b0adbf15b2fa55.zip |
Merge tag 'scpi-update-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers
SCPI update for v4.12
Single patch to optimise the completion initialisation using reinit_*
API instead of full initialisation on each and every transfer.
* tag 'scpi-update-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
firmware: arm_scpi: reinit completion instead of full init_completion()
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/arm_scpi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c index 9ad0b1934be9..f6cfc31d34c7 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c @@ -538,7 +538,7 @@ static int scpi_send_message(u8 idx, void *tx_buf, unsigned int tx_len, msg->tx_len = tx_len; msg->rx_buf = rx_buf; msg->rx_len = rx_len; - init_completion(&msg->done); + reinit_completion(&msg->done); ret = mbox_send_message(scpi_chan->chan, msg); if (ret < 0 || !rx_buf) @@ -872,8 +872,11 @@ static int scpi_alloc_xfer_list(struct device *dev, struct scpi_chan *ch) return -ENOMEM; ch->xfers = xfers; - for (i = 0; i < MAX_SCPI_XFERS; i++, xfers++) + for (i = 0; i < MAX_SCPI_XFERS; i++, xfers++) { + init_completion(&xfers->done); list_add_tail(&xfers->node, &ch->xfers_list); + } + return 0; } |