diff options
author | Thierry Reding <treding@nvidia.com> | 2023-05-30 12:53:08 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-06-01 13:17:35 +0200 |
commit | 4d6366e6ff43dcf6c23156c017829a926403bd7d (patch) | |
tree | dae7b83b7a851451fe2d03ab1f8dec03ee41070b /drivers/pinctrl | |
parent | fad57233501beb5bd25f037cb9128a533e710600 (diff) |
pinctrl: tegra: Consistently refer to SoC data
The SoC-specific data is stored in pmx->soc and that's used throughout
the driver to access this data. The probe function has access to a local
version of that copy and uses it in some occasions. Replace them with
the more standard pmx->soc access for more consistency.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20230530105308.1292852-2-thierry.reding@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/tegra/pinctrl-tegra.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c index 21e08fbd1df0..4547cf66d03b 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra.c @@ -789,9 +789,8 @@ int tegra_pinctrl_probe(struct platform_device *pdev, * Each mux group will appear in 4 functions' list of groups. * This over-allocates slightly, since not all groups are mux groups. */ - pmx->group_pins = devm_kcalloc(&pdev->dev, - soc_data->ngroups * 4, sizeof(*pmx->group_pins), - GFP_KERNEL); + pmx->group_pins = devm_kcalloc(&pdev->dev, pmx->soc->ngroups * 4, + sizeof(*pmx->group_pins), GFP_KERNEL); if (!pmx->group_pins) return -ENOMEM; @@ -802,14 +801,14 @@ int tegra_pinctrl_probe(struct platform_device *pdev, group_pins = pmx->group_pins; - for (fn = 0; fn < soc_data->nfunctions; fn++) { + for (fn = 0; fn < pmx->soc->nfunctions; fn++) { struct tegra_function *func = &pmx->functions[fn]; func->name = pmx->soc->functions[fn]; func->groups = group_pins; - for (gn = 0; gn < soc_data->ngroups; gn++) { - const struct tegra_pingroup *g = &soc_data->groups[gn]; + for (gn = 0; gn < pmx->soc->ngroups; gn++) { + const struct tegra_pingroup *g = &pmx->soc->groups[gn]; if (g->mux_reg == -1) continue; @@ -821,7 +820,7 @@ int tegra_pinctrl_probe(struct platform_device *pdev, continue; BUG_ON(group_pins - pmx->group_pins >= - soc_data->ngroups * 4); + pmx->soc->ngroups * 4); *group_pins++ = g->name; func->ngroups++; } |