regulator: qcom_spmi: Improve readability for setting up enable/mode pin control
authorAxel Lin <axel.lin@ingics.com>
Sat, 1 Aug 2020 05:48:20 +0000 (13:48 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 18 Aug 2020 16:18:45 +0000 (17:18 +0100)
commit6a1fe83bf14b87fd8b02f391ea629f69624d9c34
tree1d8a6c29d4dc068adf3426502e17160144dbf0e2
parent7d8196641ee1eea6223e68ff92362652b1c8346b
regulator: qcom_spmi: Improve readability for setting up enable/mode pin control

By checking data->pin_ctrl_enable / data->pin_ctrl_hpm flags first, then
use switch-case to improve readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20200801054820.134859-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_spmi-regulator.c