]> asedeno.scripts.mit.edu Git - linux.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)
commit89132dd8ffd2218fad3f53a9ca529e609237448a
tree937b21be21bbde3710b3933967a8e5b1cc46121e
parent29686f0151dff68e623475d449f99d8124825b17
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