pinctrl: tegra: Fix warnings and error
Fix warnings are errors caused by commit a42c7d95d2
("pinctrl: tegra: Use correct offset for pin group").
Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
d238817238
commit
f0c142fcf4
|
@ -279,7 +279,6 @@ static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctlde
|
||||||
unsigned int offset)
|
unsigned int offset)
|
||||||
{
|
{
|
||||||
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
|
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
|
||||||
struct tegra_pingroup *g;
|
|
||||||
unsigned int group, num_pins, j;
|
unsigned int group, num_pins, j;
|
||||||
const unsigned int *pins;
|
const unsigned int *pins;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -290,7 +289,7 @@ static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctlde
|
||||||
continue;
|
continue;
|
||||||
for (j = 0; j < num_pins; j++) {
|
for (j = 0; j < num_pins; j++) {
|
||||||
if (offset == pins[j])
|
if (offset == pins[j])
|
||||||
return &pmx->soc->groups[group];
|
return (struct tegra_pingroup *)&pmx->soc->groups[group];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,7 +337,7 @@ static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev,
|
||||||
group = tegra_pinctrl_get_group(pctldev, offset);
|
group = tegra_pinctrl_get_group(pctldev, offset);
|
||||||
|
|
||||||
if (!group)
|
if (!group)
|
||||||
return -EINVAL;
|
return;
|
||||||
|
|
||||||
if (group->mux_reg < 0 || group->sfsel_bit < 0)
|
if (group->mux_reg < 0 || group->sfsel_bit < 0)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue