From: Hongzhou Yang <hongzhou.yang@mediatek.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: Hongzhou Yang <hongzhou.yang@mediatek.com>,
Yingjoe Chen <yingjoe.chen@mediatek.com>,
Chaotian Jing <chaotian.jing@mediatek.com>,
Fabian Frederick <fabf@skynet.be>, Axel Lin <axel.lin@ingics.com>,
Maoguang Meng <maoguang.meng@mediatek.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com,
Sascha Hauer <kernel@pengutronix.de>,
eddie.huang@mediatek.com, dandan.he@mediatek.com
Subject: [PATCH 2/2] pinctrl: mediatek: Fix pinctrl register irq fail bug.
Date: Wed, 27 May 2015 02:43:55 -0700 [thread overview]
Message-ID: <1432719835-18939-3-git-send-email-hongzhou.yang@mediatek.com> (raw)
In-Reply-To: <1432719835-18939-1-git-send-email-hongzhou.yang@mediatek.com>
Since mt6397 is no need to support interrupt controller,
I judged "interrupt-controller" property to skip it last patch.
But the if judgement should on the contrary, this is a bug.
And find of_property_read_bool is better for this case.
So using of_property_read_bool instead of of_find_property.
Also fix bug of misuse pointer.
Signed-off-by: Hongzhou Yang <hongzhou.yang@mediatek.com>
---
drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index cd22729..f206a54 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -1280,7 +1280,7 @@ int mtk_pctrl_init(struct platform_device *pdev,
goto pctrl_error;
}
- pctl->chip = &mtk_gpio_chip;
+ *pctl->chip = mtk_gpio_chip;
pctl->chip->ngpio = pctl->devdata->npins;
pctl->chip->label = dev_name(&pdev->dev);
pctl->chip->dev = &pdev->dev;
@@ -1300,7 +1300,7 @@ int mtk_pctrl_init(struct platform_device *pdev,
goto chip_error;
}
- if (of_find_property(np, "interrupt-controller", NULL))
+ if (!of_property_read_bool(np, "interrupt-controller"))
return 0;
/* Get EINT register base from dts. */
--
1.7.9.5
next prev parent reply other threads:[~2015-05-27 9:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 9:43 [PATH] Fix ies/smt and register irq fail bug Hongzhou Yang
2015-05-27 9:43 ` [PATCH 1/2] pinctrl: mediatek: Fix bug of ies/smt setting for mt8173 Hongzhou Yang
2015-06-02 9:07 ` Linus Walleij
2015-05-27 9:43 ` Hongzhou Yang [this message]
2015-05-28 1:11 ` [PATCH 2/2] pinctrl: mediatek: Fix pinctrl register irq fail bug Axel Lin
2015-06-02 9:08 ` Linus Walleij
[not found] ` <1432719835-18939-1-git-send-email-hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-06-02 2:34 ` [PATH] Fix ies/smt and " Hongzhou Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432719835-18939-3-git-send-email-hongzhou.yang@mediatek.com \
--to=hongzhou.yang@mediatek.com \
--cc=axel.lin@ingics.com \
--cc=chaotian.jing@mediatek.com \
--cc=dandan.he@mediatek.com \
--cc=eddie.huang@mediatek.com \
--cc=fabf@skynet.be \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=maoguang.meng@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=srv_heupstream@mediatek.com \
--cc=yingjoe.chen@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox