Skip to content

Commit ec40a28

Browse files
Rahul Tanwargregkh
authored andcommitted
pinctrl: equilibrium: Fix function addition in multiple groups
[ Upstream commit 53b3947 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a0467ca commit ec40a28

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
@@ -674,6 +674,11 @@ static int eqbr_build_functions(struct eqbr_pinctrl_drv_data *drvdata)
674674
return ret;
675675

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

806811
ret = eqbr_build_functions(drvdata);
807812
if (ret) {
808-
dev_err(dev, "Failed to build groups\n");
813+
dev_err(dev, "Failed to build functions\n");
809814
return ret;
810815
}
811816

0 commit comments

Comments
 (0)