spi: spi-geni-qcom: Combine the clock setting code
authorDouglas Anderson <dianders@chromium.org>
Tue, 23 Jun 2020 10:38:54 +0000 (16:08 +0530)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 25 Jun 2020 04:50:56 +0000 (21:50 -0700)
commite68b6624a0f79a24120b427c837a46c8f0e5598f
tree692a94e7ba03ce4b2fb65f69534923389059263f
parent7cf563b2c84624face505e7a62dbf2f35e752eb3
spi: spi-geni-qcom: Combine the clock setting code

There is code for adjusting the clock both in setup_fifo_params()
(called from prepare_message()) and in setup_fifo_xfer() (called from
transfer_one()).  The code is the same.  Abstract it out to a shared
function.

This is a no-op cleanup patch.  The only change is to the error string
if we fail to set the clock.  Since the two paths has marginally
different error messages I picked the clean one.

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
Link: https://lore.kernel.org/r/1592908737-7068-6-git-send-email-akashast@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/spi/spi-geni-qcom.c