mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 14:44:12 +00:00
regmap: spi: Handle async writes of only one buffer
If the value is zero then assume it has been included in the register data and don't send anything, minimising the number of interactions with the hardware. Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
7ccda98393
commit
cd1b9dd022
1 changed files with 2 additions and 1 deletions
|
@ -73,7 +73,8 @@ static int regmap_spi_async_write(void *context,
|
|||
|
||||
spi_message_init(&async->m);
|
||||
spi_message_add_tail(&async->t[0], &async->m);
|
||||
spi_message_add_tail(&async->t[1], &async->m);
|
||||
if (val)
|
||||
spi_message_add_tail(&async->t[1], &async->m);
|
||||
|
||||
async->m.complete = regmap_spi_complete;
|
||||
async->m.context = async;
|
||||
|
|
Loading…
Reference in a new issue