Skip to content

Commit 53b3947

Browse files
Rahul TanwarLinus Walleij
authored andcommitted
pinctrl: equilibrium: Fix function addition in multiple groups
Ignore the same function with multiple groups. Fix a typo in error print. Fixes: 1948d5c ("pinctrl: Add pinmux & GPIO controller driver for a new SoC") Signed-off-by: Rahul Tanwar <rtanwar@maxlinear.com> Link: https://lore.kernel.org/r/20211020093815.20870-1-rtanwar@maxlinear.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 613c082 commit 53b3947

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/pinctrl/pinctrl-equilibrium.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,11 @@ static int eqbr_build_functions(struct eqbr_pinctrl_drv_data *drvdata)
675675
return ret;
676676

677677
for (i = 0; i < nr_funcs; i++) {
678+
679+
/* Ignore the same function with multiple groups */
680+
if (funcs[i].name == NULL)
681+
continue;
682+
678683
ret = pinmux_generic_add_function(drvdata->pctl_dev,
679684
funcs[i].name,
680685
funcs[i].groups,
@@ -815,7 +820,7 @@ static int pinctrl_reg(struct eqbr_pinctrl_drv_data *drvdata)
815820

816821
ret = eqbr_build_functions(drvdata);
817822
if (ret) {
818-
dev_err(dev, "Failed to build groups\n");
823+
dev_err(dev, "Failed to build functions\n");
819824
return ret;
820825
}
821826

0 commit comments

Comments
 (0)