Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc63d854 authored by Hongzhou Yang's avatar Hongzhou Yang Committed by Linus Walleij
Browse files

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: default avatarHongzhou Yang <hongzhou.yang@mediatek.com>
Reviewed-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 257e961d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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. */