Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: mediatek: mark dummy helpers as 'static inline'

mtk_eint_set_debounce and mtk_eint_find_irq are defined as stub functions
in a header file, but without marking them as 'static inline', we get
a copy for each file that includes the header:

drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.o: In function `mtk_eint_set_debounce':
pinctrl-mtk-common-v2.c:(.text+0x134): multiple definition of `mtk_eint_set_debounce'
drivers/pinctrl/mediatek/pinctrl-moore.o:pinctrl-moore.c:(.text+0x7d0): first defined here
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.o: In function `mtk_eint_find_irq':
pinctrl-mtk-common-v2.c:(.text+0x13c): multiple definition of `mtk_eint_find_irq'

Fixes: e46df235b4e6 ("pinctrl: mediatek: refactor EINT related code for all MediaTek pinctrl can fit")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Arnd Bergmann and committed by
Linus Walleij
ad335bee 7a52127e

+2 -2
+2 -2
drivers/pinctrl/mediatek/mtk-eint.h
··· 92 92 return -EOPNOTSUPP; 93 93 } 94 94 95 - int mtk_eint_set_debounce(struct mtk_eint *eint, unsigned long eint_n, 95 + static inline int mtk_eint_set_debounce(struct mtk_eint *eint, unsigned long eint_n, 96 96 unsigned int debounce) 97 97 { 98 98 return -EOPNOTSUPP; 99 99 } 100 100 101 - int mtk_eint_find_irq(struct mtk_eint *eint, unsigned long eint_n) 101 + static inline int mtk_eint_find_irq(struct mtk_eint *eint, unsigned long eint_n) 102 102 { 103 103 return -EOPNOTSUPP; 104 104 }