pinctrl: mediatek: moore: use pinmux_generic_add_pinfunction()
Instead of passing individual fields of struct pinfunction to pinmux_generic_add_function(), use pinmux_generic_add_pinfunction() and pass the entire structure directly. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/20250709-pinctrl-gpio-pinfuncs-v2-5-b6135149c0d9@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
committed by
Linus Walleij
parent
7d7883db6e
commit
8f8fe52c5a
@@ -625,9 +625,8 @@ static int mtk_build_functions(struct mtk_pinctrl *hw)
|
||||
const struct function_desc *function = hw->soc->funcs + i;
|
||||
const struct pinfunction *func = &function->func;
|
||||
|
||||
err = pinmux_generic_add_function(hw->pctrl, func->name,
|
||||
func->groups, func->ngroups,
|
||||
function->data);
|
||||
err = pinmux_generic_add_pinfunction(hw->pctrl, func,
|
||||
function->data);
|
||||
if (err < 0) {
|
||||
dev_err(hw->dev, "Failed to register function %s\n",
|
||||
func->name);
|
||||
|
||||
Reference in New Issue
Block a user