Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thierry Reding and committed by
Linus Walleij
4d6366e6 fad57233

+6 -7
+6 -7
drivers/pinctrl/tegra/pinctrl-tegra.c
··· 789 789 * Each mux group will appear in 4 functions' list of groups. 790 790 * This over-allocates slightly, since not all groups are mux groups. 791 791 */ 792 - pmx->group_pins = devm_kcalloc(&pdev->dev, 793 - soc_data->ngroups * 4, sizeof(*pmx->group_pins), 794 - GFP_KERNEL); 792 + pmx->group_pins = devm_kcalloc(&pdev->dev, pmx->soc->ngroups * 4, 793 + sizeof(*pmx->group_pins), GFP_KERNEL); 795 794 if (!pmx->group_pins) 796 795 return -ENOMEM; 797 796 ··· 801 802 802 803 group_pins = pmx->group_pins; 803 804 804 - for (fn = 0; fn < soc_data->nfunctions; fn++) { 805 + for (fn = 0; fn < pmx->soc->nfunctions; fn++) { 805 806 struct tegra_function *func = &pmx->functions[fn]; 806 807 807 808 func->name = pmx->soc->functions[fn]; 808 809 func->groups = group_pins; 809 810 810 - for (gn = 0; gn < soc_data->ngroups; gn++) { 811 - const struct tegra_pingroup *g = &soc_data->groups[gn]; 811 + for (gn = 0; gn < pmx->soc->ngroups; gn++) { 812 + const struct tegra_pingroup *g = &pmx->soc->groups[gn]; 812 813 813 814 if (g->mux_reg == -1) 814 815 continue; ··· 820 821 continue; 821 822 822 823 BUG_ON(group_pins - pmx->group_pins >= 823 - soc_data->ngroups * 4); 824 + pmx->soc->ngroups * 4); 824 825 *group_pins++ = g->name; 825 826 func->ngroups++; 826 827 }