]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: mediatek: extend eint build to pinctrl-mtk-common-v2.c
authorSean Wang <sean.wang@mediatek.com>
Sat, 8 Sep 2018 11:07:37 +0000 (19:07 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 18 Sep 2018 21:53:37 +0000 (14:53 -0700)
commitad6507c4d883c69bd37a9bfd656f391f1a34a03a
tree937b21be21bbde3710b3933967a8e5b1cc46121e
parent033020e859f7b6df19d797be826d43d14b9c77d7
pinctrl: mediatek: extend eint build to pinctrl-mtk-common-v2.c

Almost all MediaTek SoCs apply the exact same logic to build eint, so move
the common functions into pinctrl-mtk-common-v2.c to allow each new pinctrl
driver to reuse them. Also, add a protection checker on hw->soc->eint_hw to
avoid invalid memory access when there's certain SoC not to define its
eint_hw properly in the code flow.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-moore.c
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h