summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/tegra
diff options
context:
space:
mode:
authorPrathamesh Shete <pshete@nvidia.com>2021-10-28 17:32:35 +0530
committerLinus Walleij <linus.walleij@linaro.org>2021-11-16 02:19:14 +0100
commit55924812d208a8a27a6690db2bbba357bd2773f0 (patch)
tree9fa23ec6f91cf74b2c6d790655cd5311f89d4843 /drivers/pinctrl/tegra
parent2d54067fcd23aae61e23508425ae5b29e973573d (diff)
downloadlinux-stable-55924812d208a8a27a6690db2bbba357bd2773f0.tar.gz
linux-stable-55924812d208a8a27a6690db2bbba357bd2773f0.tar.bz2
linux-stable-55924812d208a8a27a6690db2bbba357bd2773f0.zip
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>
Diffstat (limited to 'drivers/pinctrl/tegra')
-rw-r--r--drivers/pinctrl/tegra/pinctrl-tegra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c
index 8d734bfc33d2..50bd26a30ac0 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra.c
@@ -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];
}
}