pinctrl: tegra: Return const pointer from tegra_pinctrl_get_group()

Instead of returning const pointer from tegra_pinctrl_get_group()
the return value is being casted.

This change helps return const pointer.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Prathamesh Shete 2021-10-28 17:32:35 +05:30 committed by Linus Walleij
parent 2d54067fcd
commit 55924812d2
1 changed files with 2 additions and 2 deletions

View File

@ -275,7 +275,7 @@ static int tegra_pinctrl_set_mux(struct pinctrl_dev *pctldev,
return 0;
}
static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldev,
static const struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldev,
unsigned int offset)
{
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
@ -289,7 +289,7 @@ static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctlde
continue;
for (j = 0; j < num_pins; j++) {
if (offset == pins[j])
return (struct tegra_pingroup *)&pmx->soc->groups[group];
return &pmx->soc->groups[group];
}
}