diff options
author | Hongzhou Yang <hongzhou.yang@mediatek.com> | 2015-05-27 09:43:55 (GMT) |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-06-02 09:08:03 (GMT) |
commit | fc63d854cb55bfe2b6c67317b5bd91aaa2d058c3 (patch) | |
tree | 8cba318fb3c2a0aeb0867d369c1bd628fe055745 /drivers/pinctrl | |
parent | 257e961ddd66998b360447ea27db7936d8defaa0 (diff) | |
download | linux-fc63d854cb55bfe2b6c67317b5bd91aaa2d058c3.tar.xz |
pinctrl: mediatek: Fix pinctrl register irq fail bug.
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>
Reviewed-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 |
1 files 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. */ |