mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
pinctrl: equilibrium: Fix function addition in multiple groups
[ Upstream commit53b3947ddb] Ignore the same function with multiple groups. Fix a typo in error print. Fixes:1948d5c51d("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
286ff24b00
commit
804732ec30
@@ -675,6 +675,11 @@ static int eqbr_build_functions(struct eqbr_pinctrl_drv_data *drvdata)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
for (i = 0; i < nr_funcs; i++) {
|
for (i = 0; i < nr_funcs; i++) {
|
||||||
|
|
||||||
|
/* Ignore the same function with multiple groups */
|
||||||
|
if (funcs[i].name == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
ret = pinmux_generic_add_function(drvdata->pctl_dev,
|
ret = pinmux_generic_add_function(drvdata->pctl_dev,
|
||||||
funcs[i].name,
|
funcs[i].name,
|
||||||
funcs[i].groups,
|
funcs[i].groups,
|
||||||
@@ -815,7 +820,7 @@ static int pinctrl_reg(struct eqbr_pinctrl_drv_data *drvdata)
|
|||||||
|
|
||||||
ret = eqbr_build_functions(drvdata);
|
ret = eqbr_build_functions(drvdata);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "Failed to build groups\n");
|
dev_err(dev, "Failed to build functions\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user