lkml.org 
[lkml]   [2015]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] pinctrl: qcom-spmi-mpp: Fix input value report
On Thu 09 Apr 08:18 PDT 2015, Ivan T. Ivanov wrote:

> Fix interpretation of the pmic_mpp_read() return code,
> negative value means an error.
>
> Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
> ---
> drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> index 8f36c5f..8f6c7be 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> @@ -576,10 +576,11 @@ static void pmic_mpp_config_dbg_show(struct pinctrl_dev *pctldev,
>
> if (pad->input_enabled) {
> ret = pmic_mpp_read(state, pad, PMIC_MPP_REG_RT_STS);
> - if (!ret) {
> - ret &= PMIC_MPP_REG_RT_STS_VAL_MASK;
> - pad->out_value = ret;
> - }
> + if (ret < 0)
> + return;
> +
> + ret &= PMIC_MPP_REG_RT_STS_VAL_MASK;
> + pad->out_value = ret;

Same as with the gpio driver.

Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>

Regards,
Bjrn


\
 
 \ /
  Last update: 2015-04-09 18:42    [W:0.077 / U:1.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site