pinctrl: starfive: Serialize adding groups and functions
authorJianlong Huang <jianlong.huang@starfivetech.com>
Mon, 27 Jun 2022 08:53:33 +0000 (10:53 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 11 Jul 2022 08:22:57 +0000 (10:22 +0200)
commite2961cd685fe548f0ffd6c7bd3ae6a491301b1e4
tree32015cc926296d7318fe4c62c543b72849ab933e
parent04131ae29b2d9879ad2357e2b20a5de4dfee89cb
pinctrl: starfive: Serialize adding groups and functions

The pinctrl dt_node_to_map method may be called in parallel which leads
us to call pinconf_generic_add_group and pinconf_generic_add_function
in parallel. This is not supported though and leads to errors, so add a
mutex to serialize these calls.

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Link: https://lore.kernel.org/r/20220627085333.1774396-1-emil.renner.berthing@canonical.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-starfive.c