Skip to content

Commit 5592481

Browse files
Prathamesh Shetelinusw
authored andcommitted
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 2d54067 commit 5592481

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pinctrl/tegra/pinctrl-tegra.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ static int tegra_pinctrl_set_mux(struct pinctrl_dev *pctldev,
275275
return 0;
276276
}
277277

278-
static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldev,
278+
static const struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldev,
279279
unsigned int offset)
280280
{
281281
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
289289
continue;
290290
for (j = 0; j < num_pins; j++) {
291291
if (offset == pins[j])
292-
return (struct tegra_pingroup *)&pmx->soc->groups[group];
292+
return &pmx->soc->groups[group];
293293
}
294294
}
295295

0 commit comments

Comments
 (0)