diff mbox series

pinctrl: qcom: fix wrong write in update_dual_edge

Message ID 20200414003726.25347-1-ansuelsmth@gmail.com (mailing list archive)
State Accepted
Commit 90bcb0c3ca0809d1ed358bfbf838df4b3d4e58e0
Headers show
Series pinctrl: qcom: fix wrong write in update_dual_edge | expand

Commit Message

Christian Marangi April 14, 2020, 12:37 a.m. UTC
Fix a typo in the readl/writel accessor conversion where val is used
instead of pol changing the behavior of the original code.

Fixes: 6c73698904aa pinctrl: qcom: Introduce readl/writel accessors

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 drivers/pinctrl/qcom/pinctrl-msm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bjorn Andersson April 14, 2020, 1:04 a.m. UTC | #1
On Mon 13 Apr 17:37 PDT 2020, Ansuel Smith wrote:

> Fix a typo in the readl/writel accessor conversion where val is used
> instead of pol changing the behavior of the original code.
> 
> Fixes: 6c73698904aa pinctrl: qcom: Introduce readl/writel accessors
> 
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>

Thank you Ansuel

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Linus, when you apply this please add
Cc: stable@vger.kernel.org

Thanks,
Bjorn

> ---
>  drivers/pinctrl/qcom/pinctrl-msm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
> index 1a948c3f54b7..9f1c9951949e 100644
> --- a/drivers/pinctrl/qcom/pinctrl-msm.c
> +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
> @@ -692,7 +692,7 @@ static void msm_gpio_update_dual_edge_pos(struct msm_pinctrl *pctrl,
>  
>  		pol = msm_readl_intr_cfg(pctrl, g);
>  		pol ^= BIT(g->intr_polarity_bit);
> -		msm_writel_intr_cfg(val, pctrl, g);
> +		msm_writel_intr_cfg(pol, pctrl, g);
>  
>  		val2 = msm_readl_io(pctrl, g) & BIT(g->in_bit);
>  		intstat = msm_readl_intr_status(pctrl, g);
> -- 
> 2.25.1
>
Linus Walleij April 16, 2020, 11:16 a.m. UTC | #2
On Tue, Apr 14, 2020 at 2:37 AM Ansuel Smith <ansuelsmth@gmail.com> wrote:

> Fix a typo in the readl/writel accessor conversion where val is used
> instead of pol changing the behavior of the original code.
>
> Fixes: 6c73698904aa pinctrl: qcom: Introduce readl/writel accessors
>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>

Patch applied for fixes and tagged for stable with Bjorn's ACK.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index 1a948c3f54b7..9f1c9951949e 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -692,7 +692,7 @@  static void msm_gpio_update_dual_edge_pos(struct msm_pinctrl *pctrl,
 
 		pol = msm_readl_intr_cfg(pctrl, g);
 		pol ^= BIT(g->intr_polarity_bit);
-		msm_writel_intr_cfg(val, pctrl, g);
+		msm_writel_intr_cfg(pol, pctrl, g);
 
 		val2 = msm_readl_io(pctrl, g) & BIT(g->in_bit);
 		intstat = msm_readl_intr_status(pctrl, g);