OSDN Git Service

spi: spi-geni-qcom: Don't set {tx,rx}_rem_bytes unnecessarily
authorStephen Boyd <swboyd@chromium.org>
Sat, 20 Jun 2020 02:22:33 +0000 (19:22 -0700)
committerMark Brown <broonie@kernel.org>
Mon, 22 Jun 2020 14:58:31 +0000 (15:58 +0100)
commit59ab0fa0c8078f46e747f03191830385f111b35b
tree75acd5ed2cc8feb7c6bdcc2e856757d7910c9282
parent19ea327544507dbebc1630bc93ea188e4fae94bb
spi: spi-geni-qcom: Don't set {tx,rx}_rem_bytes unnecessarily

We only need to test for these counters being non-zero when we see the
end of a transfer. If we're doing a CS change then they will already be
zero.  This implies that we don't need to set these to 0 if we're
cancelling an in flight transfer too, because we only care to test these
counters when the 'DONE' bit is set in the hardware and we've set them
to non-zero for a transfer.

This is a non-functional change, just cleanup to consolidate code.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200620022233.64716-3-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-geni-qcom.c