pinctrl: airoha: 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-4-b6135149c0d9@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
committed by
Linus Walleij
parent
cc154c00a6
commit
7d7883db6e
@@ -2907,11 +2907,9 @@ static int airoha_pinctrl_probe(struct platform_device *pdev)
|
||||
const struct airoha_pinctrl_func *func;
|
||||
|
||||
func = &airoha_pinctrl_funcs[i];
|
||||
err = pinmux_generic_add_function(pinctrl->ctrl,
|
||||
func->desc.func.name,
|
||||
func->desc.func.groups,
|
||||
func->desc.func.ngroups,
|
||||
(void *)func);
|
||||
err = pinmux_generic_add_pinfunction(pinctrl->ctrl,
|
||||
&func->desc.func,
|
||||
(void *)func);
|
||||
if (err < 0) {
|
||||
dev_err(dev, "Failed to register function %s\n",
|
||||
func->desc.func.name);
|
||||
|
||||
Reference in New Issue
Block a user