regulator: qcom_spmi: Refactor get_mode/set_mode
authorJeffrey Hugo <jeffrey.l.hugo@gmail.com>
Thu, 13 Jun 2019 21:25:31 +0000 (14:25 -0700)
committerMark Brown <broonie@kernel.org>
Mon, 17 Jun 2019 14:50:11 +0000 (15:50 +0100)
commitba576a6232dc06605f4edfaeea9b526ba7724f84
treef269ddb88b285247254ea34ed302cf8424e9120a
parent86f4ff7a0c0cd8e391ffa4dd0edb82ae0eedcc9e
regulator: qcom_spmi: Refactor get_mode/set_mode

spmi_regulator_common_get_mode and spmi_regulator_common_set_mode use
multi-level ifs which mirror a switch statement.  Refactor to use a switch
statement to make the code flow more clear.

Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_spmi-regulator.c