Skip to content

Commit 4d6366e

Browse files
thierryredinglinusw
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent fad5723 commit 4d6366e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

drivers/pinctrl/tegra/pinctrl-tegra.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -789,9 +789,8 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
789789
* Each mux group will appear in 4 functions' list of groups.
790790
* This over-allocates slightly, since not all groups are mux groups.
791791
*/
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);
795794
if (!pmx->group_pins)
796795
return -ENOMEM;
797796

@@ -802,14 +801,14 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
802801

803802
group_pins = pmx->group_pins;
804803

805-
for (fn = 0; fn < soc_data->nfunctions; fn++) {
804+
for (fn = 0; fn < pmx->soc->nfunctions; fn++) {
806805
struct tegra_function *func = &pmx->functions[fn];
807806

808807
func->name = pmx->soc->functions[fn];
809808
func->groups = group_pins;
810809

811-
for (gn = 0; gn < soc_data->ngroups; gn++) {
812-
const struct tegra_pingroup *g = &soc_data->groups[gn];
810+
for (gn = 0; gn < pmx->soc->ngroups; gn++) {
811+
const struct tegra_pingroup *g = &pmx->soc->groups[gn];
813812

814813
if (g->mux_reg == -1)
815814
continue;
@@ -821,7 +820,7 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
821820
continue;
822821

823822
BUG_ON(group_pins - pmx->group_pins >=
824-
soc_data->ngroups * 4);
823+
pmx->soc->ngroups * 4);
825824
*group_pins++ = g->name;
826825
func->ngroups++;
827826
}

0 commit comments

Comments
 (0)