pinctrl: stm32: Print invalid AF warning inside stm32_pctrl_is_function_valid()
authorMarek Vasut <marex@denx.de>
Tue, 6 Apr 2021 18:00:35 +0000 (20:00 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 8 Apr 2021 07:52:20 +0000 (09:52 +0200)
commit589b9b8b7b98ef091d1a5c5c6e27e9cef221d83f
treea69ba55c622f67362b31b659f9f7634048e71fb7
parentda35b19d62c17f1f25878be5cb2d8cd501b1c3c6
pinctrl: stm32: Print invalid AF warning inside stm32_pctrl_is_function_valid()

The "invalid function %d on pin %d .\n" message is triplicated in the
driver in different variants, just pull it into the function and have
it once in the driver. The bonus is that all variants of the message
now print the pin number and AF consistently, so it is easier to debug
such pinmux problems.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabien Dessenne <fabien.dessenne@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-stm32@st-md-mailman.stormreply.com
To: linux-arm-kernel@lists.infradead.org
Acked-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Link: https://lore.kernel.org/r/20210406180035.279249-1-marex@denx.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/stm32/pinctrl-stm32.c