summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/tegra/pinctrl-tegra30.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2023-05-30 13:53:07 +0300
committerLinus Walleij <linus.walleij@linaro.org>2023-06-01 14:17:35 +0300
commitfad57233501beb5bd25f037cb9128a533e710600 (patch)
tree8695fd6cde5ff376ba61dd280ae34758c9d50c35 /drivers/pinctrl/tegra/pinctrl-tegra30.c
parenta5961bed5429cf1134d7f539b4ed60317012f84d (diff)
downloadlinux-fad57233501beb5bd25f037cb9128a533e710600.tar.xz
pinctrl: tegra: Duplicate pinmux functions table
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>
Diffstat (limited to 'drivers/pinctrl/tegra/pinctrl-tegra30.c')
-rw-r--r--drivers/pinctrl/tegra/pinctrl-tegra30.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra30.c b/drivers/pinctrl/tegra/pinctrl-tegra30.c
index 7299a371827f..de5aa2d4d28d 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra30.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra30.c
@@ -2010,12 +2010,9 @@ enum tegra_mux {
TEGRA_MUX_VI_ALT3,
};
-#define FUNCTION(fname) \
- { \
- .name = #fname, \
- }
+#define FUNCTION(fname) #fname
-static struct tegra_function tegra30_functions[] = {
+static const char * const tegra30_functions[] = {
FUNCTION(blink),
FUNCTION(cec),
FUNCTION(clk_12m_out),