1
0
Fork 0

SCPI update for v4.12

Single patch to optimise the completion initialisation using reinit_*
 API instead of full initialisation on each and every transfer.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJY3oJjAAoJEABBurwxfuKY/KcP/RiCHfcbIBVaA3W5MUSvNeQN
 mpxfVXmBgyoqq81bZByrvcjtk/4/4q2nLoKucIZV8aGzTjXUrWhHCw9TIMQ8wrqz
 doMfhbbaLC1I52dSXrmAYySI8psjEyC8vdtVlASeeX8PaMycTUfvRYoWPYLcxlwB
 aOjkuQb04gyHGr64yJzECcebz7jmJ7+KHqO9UjYQUJWgBGv3Fz1WcM2AooJvNcXB
 L04K8lJzcHzCREfw08iOdgHpegIq2rSje0Q5hf6OdNCGlv1U3hX53y7Yi7yDiQhJ
 lIC+ko/DVfXlpFJ8mYS1VM9fMPhXiGXhp7ZQE3HEfQVkSqQj1F27ROyo4rHXZlbV
 wiIgcJr2Cz2/GXvvnnTiBDmcQzChypQLMZJckorrH9fKEiILzxW3jdRO9Hi5tXUL
 Ci/Yg0sZ8R+xik24KWK76O1zyry3Cstndn2mUJIG/1wlo4XtP11E5CLFnNAG+F+X
 Nse/gJ6iKkHnVI9V0ml8rENVIlr2Pi3Obox8t7mBPOUf+tDjQAaVG1OqXINygo2y
 9+C0jDmS0BJ3YuwEZHhIkzBH2fOMRw4aiRbDx8CRKp4es5cc3YGyVADzev75K+8E
 oRoyDmClBMKwQy+E5EM/QY+0zGWYF7pf2rTElvrDHwGXvQErt1GOag1La8oNbqk2
 DOEWgv8aL7E+FyoeWjrQ
 =Iz6D
 -----END PGP SIGNATURE-----

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>
hifive-unleashed-5.1
Olof Johansson 2017-04-19 05:21:35 -07:00
commit be6beaa8d1
1 changed files with 5 additions and 2 deletions

View File

@ -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;
}