]> git.baikalelectronics.ru Git - kernel.git/commit
spi: Only call transfer_one() if we have buffers to transfer
authorMark Brown <broonie@linaro.org>
Sat, 16 Aug 2014 15:27:41 +0000 (16:27 +0100)
committerMark Brown <broonie@linaro.org>
Tue, 19 Aug 2014 21:08:58 +0000 (16:08 -0500)
commit3381719be9f378aed733746dd09b7a84d4ef4914
tree1e09865555d0c2dadf6d81445ad7f3f766058815
parentca09702717581356bb91e5bbfbb244eda384a004
spi: Only call transfer_one() if we have buffers to transfer

Client drivers such as the ChomeOS EC driver sometimes use transfers with
no buffers and only a delay specified in order to allow a delay after the
assertion of /CS. Rather than require controller drivers handle this noop
case gracefully put checks in the core to ensure that we don't call into
the controller for such transfers.

Reported-by: Addy Ke <addy.ke@rock-chips.com>
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi.c