pinctrl: remove remaining users of gpiochip_remove() retval
Some drivers accidentally still use the return value from gpiochip_remove(). Get rid of them so we can simplify this function and get rid of the return value. Cc: Abdoulaye Berthe <berthe.ab@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
88d5e520aa
commit
2fcea6cecb
@ -1298,10 +1298,7 @@ static int abx500_gpio_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_rem_chip:
|
out_rem_chip:
|
||||||
err = gpiochip_remove(&pct->chip);
|
gpiochip_remove(&pct->chip);
|
||||||
if (err)
|
|
||||||
dev_info(&pdev->dev, "failed to remove gpiochip\n");
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1312,15 +1309,8 @@ out_rem_chip:
|
|||||||
static int abx500_gpio_remove(struct platform_device *pdev)
|
static int abx500_gpio_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct abx500_pinctrl *pct = platform_get_drvdata(pdev);
|
struct abx500_pinctrl *pct = platform_get_drvdata(pdev);
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = gpiochip_remove(&pct->chip);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(pct->dev, "unable to remove gpiochip: %d\n",
|
|
||||||
ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
gpiochip_remove(&pct->chip);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1261,7 +1261,7 @@ static int nmk_gpio_probe(struct platform_device *dev)
|
|||||||
IRQ_TYPE_EDGE_FALLING);
|
IRQ_TYPE_EDGE_FALLING);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&dev->dev, "could not add irqchip\n");
|
dev_err(&dev->dev, "could not add irqchip\n");
|
||||||
ret = gpiochip_remove(&nmk_chip->chip);
|
gpiochip_remove(&nmk_chip->chip);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
/* Then register the chain on the parent IRQ */
|
/* Then register the chain on the parent IRQ */
|
||||||
|
@ -903,16 +903,9 @@ EXPORT_SYMBOL(msm_pinctrl_probe);
|
|||||||
int msm_pinctrl_remove(struct platform_device *pdev)
|
int msm_pinctrl_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct msm_pinctrl *pctrl = platform_get_drvdata(pdev);
|
struct msm_pinctrl *pctrl = platform_get_drvdata(pdev);
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = gpiochip_remove(&pctrl->chip);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(&pdev->dev, "Failed to remove gpiochip\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
gpiochip_remove(&pctrl->chip);
|
||||||
pinctrl_unregister(pctrl->pctrl);
|
pinctrl_unregister(pctrl->pctrl);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(msm_pinctrl_remove);
|
EXPORT_SYMBOL(msm_pinctrl_remove);
|
||||||
|
@ -873,11 +873,7 @@ static int exynos5440_gpiolib_register(struct platform_device *pdev,
|
|||||||
static int exynos5440_gpiolib_unregister(struct platform_device *pdev,
|
static int exynos5440_gpiolib_unregister(struct platform_device *pdev,
|
||||||
struct exynos5440_pinctrl_priv_data *priv)
|
struct exynos5440_pinctrl_priv_data *priv)
|
||||||
{
|
{
|
||||||
int ret = gpiochip_remove(priv->gc);
|
gpiochip_remove(priv->gc);
|
||||||
if (ret) {
|
|
||||||
dev_err(&pdev->dev, "gpio chip remove failed\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -945,9 +945,7 @@ static int samsung_gpiolib_register(struct platform_device *pdev,
|
|||||||
|
|
||||||
fail:
|
fail:
|
||||||
for (--i, --bank; i >= 0; --i, --bank)
|
for (--i, --bank; i >= 0; --i, --bank)
|
||||||
if (gpiochip_remove(&bank->gpio_chip))
|
gpiochip_remove(&bank->gpio_chip);
|
||||||
dev_err(&pdev->dev, "gpio chip %s remove failed\n",
|
|
||||||
bank->gpio_chip.label);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -957,16 +955,11 @@ static int samsung_gpiolib_unregister(struct platform_device *pdev,
|
|||||||
{
|
{
|
||||||
struct samsung_pin_ctrl *ctrl = drvdata->ctrl;
|
struct samsung_pin_ctrl *ctrl = drvdata->ctrl;
|
||||||
struct samsung_pin_bank *bank = ctrl->pin_banks;
|
struct samsung_pin_bank *bank = ctrl->pin_banks;
|
||||||
int ret = 0;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; !ret && i < ctrl->nr_banks; ++i, ++bank)
|
for (i = 0; i < ctrl->nr_banks; ++i, ++bank)
|
||||||
ret = gpiochip_remove(&bank->gpio_chip);
|
gpiochip_remove(&bank->gpio_chip);
|
||||||
|
return 0;
|
||||||
if (ret)
|
|
||||||
dev_err(&pdev->dev, "gpio chip remove failed\n");
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id samsung_pinctrl_dt_match[];
|
static const struct of_device_id samsung_pinctrl_dt_match[];
|
||||||
|
@ -877,8 +877,7 @@ static int sirfsoc_gpio_probe(struct device_node *np)
|
|||||||
|
|
||||||
out_no_range:
|
out_no_range:
|
||||||
out_banks:
|
out_banks:
|
||||||
if (gpiochip_remove(&sgpio->chip.gc))
|
gpiochip_remove(&sgpio->chip.gc);
|
||||||
dev_err(&pdev->dev, "could not remove gpio chip\n");
|
|
||||||
out:
|
out:
|
||||||
iounmap(regs);
|
iounmap(regs);
|
||||||
return err;
|
return err;
|
||||||
|
Loading…
Reference in New Issue
Block a user