diff options
author | Thierry Reding <treding@nvidia.com> | 2023-05-30 13:53:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-07-19 17:36:11 +0300 |
commit | db103b83658c1fd8fe2e02f470d4856cd72be9a9 (patch) | |
tree | 29147e8a636d7b2db1100394912cf388ece901bf /drivers/pinctrl/tegra/pinctrl-tegra.h | |
parent | 49234a401e161a2f2698f4612ab792c49b3cad1b (diff) | |
download | linux-db103b83658c1fd8fe2e02f470d4856cd72be9a9.tar.xz |
pinctrl: tegra: Duplicate pinmux functions table
[ Upstream commit fad57233501beb5bd25f037cb9128a533e710600 ]
The function table is filled with group information based on other
instance-specific data at runtime. However, the function table can be
shared between multiple instances, causing the ->probe() function for
one instance to overwrite the table of a previously probed instance.
Fix this by sharing only the function names and allocating a separate
function table for each instance.
Fixes: 5a0047360743 ("pinctrl: tegra: Separate Tegra194 instances")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20230530105308.1292852-1-thierry.reding@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/pinctrl/tegra/pinctrl-tegra.h')
-rw-r--r-- | drivers/pinctrl/tegra/pinctrl-tegra.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.h b/drivers/pinctrl/tegra/pinctrl-tegra.h index 6130cba7cce5..b3289bdf727d 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra.h +++ b/drivers/pinctrl/tegra/pinctrl-tegra.h @@ -13,6 +13,7 @@ struct tegra_pmx { struct pinctrl_dev *pctl; const struct tegra_pinctrl_soc_data *soc; + struct tegra_function *functions; const char **group_pins; struct pinctrl_gpio_range gpio_range; @@ -191,7 +192,7 @@ struct tegra_pinctrl_soc_data { const char *gpio_compatible; const struct pinctrl_pin_desc *pins; unsigned npins; - struct tegra_function *functions; + const char * const *functions; unsigned nfunctions; const struct tegra_pingroup *groups; unsigned ngroups; |