Skip to content

Commit 6e01e0c

Browse files
thierryredinglinusw
authored andcommitted
pinctrl: tegra: Pass struct tegra_pmx for pin range check
Pass the struct tegra_pmx when checking for the pin range in device tree. This makes the call site a bit easier to read and will help keep that readability in a subsequent patch. Signed-off-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Vidya Sagar <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 66539e6 commit 6e01e0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/pinctrl/tegra/pinctrl-tegra.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,12 +689,12 @@ const struct dev_pm_ops tegra_pinctrl_pm = {
689689
.resume = &tegra_pinctrl_resume
690690
};
691691

692-
static bool gpio_node_has_range(const char *compatible)
692+
static bool tegra_pinctrl_gpio_node_has_range(struct tegra_pmx *pmx)
693693
{
694694
struct device_node *np;
695695
bool has_prop = false;
696696

697-
np = of_find_compatible_node(NULL, NULL, compatible);
697+
np = of_find_compatible_node(NULL, NULL, pmx->soc->gpio_compatible);
698698
if (!np)
699699
return has_prop;
700700

@@ -794,7 +794,7 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
794794

795795
tegra_pinctrl_clear_parked_bits(pmx);
796796

797-
if (!gpio_node_has_range(pmx->soc->gpio_compatible))
797+
if (!tegra_pinctrl_gpio_node_has_range(pmx))
798798
pinctrl_add_gpio_range(pmx->pctl, &tegra_pinctrl_gpio_range);
799799

800800
platform_set_drvdata(pdev, pmx);

0 commit comments

Comments
 (0)