* [PATCH] gpio: remove remaining users of gpiochip_remove() retval
@ 2014-09-16 22:12 Linus Walleij
2014-09-17 15:34 ` Javier Martinez Canillas
2014-09-19 7:40 ` Alexandre Courbot
0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2014-09-16 22:12 UTC (permalink / raw)
To: linux-gpio; +Cc: Alexandre Courbot, Linus Walleij
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.
Abdoulaye Berthe <berthe.ab@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/gpio/gpio-crystalcove.c | 9 +++------
drivers/gpio/gpio-omap.c | 2 +-
drivers/gpio/gpio-xgene.c | 7 ++-----
drivers/gpio/gpio-zynq.c | 8 +-------
4 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c
index 934462f5bd22..e3712f0e51ab 100644
--- a/drivers/gpio/gpio-crystalcove.c
+++ b/drivers/gpio/gpio-crystalcove.c
@@ -346,7 +346,7 @@ static int crystalcove_gpio_probe(struct platform_device *pdev)
return 0;
out_remove_gpio:
- WARN_ON(gpiochip_remove(&cg->chip));
+ gpiochip_remove(&cg->chip);
return retval;
}
@@ -354,14 +354,11 @@ static int crystalcove_gpio_remove(struct platform_device *pdev)
{
struct crystalcove_gpio *cg = platform_get_drvdata(pdev);
int irq = platform_get_irq(pdev, 0);
- int err;
-
- err = gpiochip_remove(&cg->chip);
+ gpiochip_remove(&cg->chip);
if (irq >= 0)
free_irq(irq, cg);
-
- return err;
+ return 0;
}
static struct platform_driver crystalcove_gpio_driver = {
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 174932165fcb..5cd33677a018 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1143,7 +1143,7 @@ static int omap_gpio_chip_init(struct gpio_bank *bank)
if (ret) {
dev_err(bank->dev, "Couldn't add irqchip to gpiochip %d\n", ret);
- ret = gpiochip_remove(&bank->chip);
+ gpiochip_remove(&bank->chip);
return -ENODEV;
}
diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c
index e25ba14fbb64..f1944d496c3b 100644
--- a/drivers/gpio/gpio-xgene.c
+++ b/drivers/gpio/gpio-xgene.c
@@ -216,12 +216,9 @@ err:
static int xgene_gpio_remove(struct platform_device *pdev)
{
struct xgene_gpio *gpio = platform_get_drvdata(pdev);
- int ret = 0;
- ret = gpiochip_remove(&gpio->chip);
- if (ret)
- dev_err(&pdev->dev, "unable to remove gpio_chip.\n");
- return ret;
+ gpiochip_remove(&gpio->chip);
+ return 0;
}
#ifdef CONFIG_OF
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 5dfbced24815..74cd480bf8de 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -686,16 +686,10 @@ err_disable_clk:
*/
static int zynq_gpio_remove(struct platform_device *pdev)
{
- int ret;
struct zynq_gpio *gpio = platform_get_drvdata(pdev);
pm_runtime_get_sync(&pdev->dev);
-
- ret = gpiochip_remove(&gpio->chip);
- if (ret) {
- dev_err(&pdev->dev, "Failed to remove gpio chip\n");
- return ret;
- }
+ gpiochip_remove(&gpio->chip);
clk_disable_unprepare(gpio->clk);
device_set_wakeup_capable(&pdev->dev, 0);
return 0;
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: remove remaining users of gpiochip_remove() retval
2014-09-16 22:12 [PATCH] gpio: remove remaining users of gpiochip_remove() retval Linus Walleij
@ 2014-09-17 15:34 ` Javier Martinez Canillas
2014-09-19 7:40 ` Alexandre Courbot
1 sibling, 0 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2014-09-17 15:34 UTC (permalink / raw)
To: Linus Walleij; +Cc: Linux GPIO List, Alexandre Courbot
Hello Linus,
On Wed, Sep 17, 2014 at 12:12 AM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> 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.
>
> Abdoulaye Berthe <berthe.ab@gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/gpio/gpio-crystalcove.c | 9 +++------
> drivers/gpio/gpio-omap.c | 2 +-
For gpio-omap driver:
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Best regards,
Javier
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: remove remaining users of gpiochip_remove() retval
2014-09-16 22:12 [PATCH] gpio: remove remaining users of gpiochip_remove() retval Linus Walleij
2014-09-17 15:34 ` Javier Martinez Canillas
@ 2014-09-19 7:40 ` Alexandre Courbot
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Courbot @ 2014-09-19 7:40 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-gpio@vger.kernel.org, Alexandre Courbot
On Wed, Sep 17, 2014 at 7:12 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> 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.
>
> Abdoulaye Berthe <berthe.ab@gmail.com>
Aren't you missing a CC: tag here?
Otherwise,
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-19 7:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-16 22:12 [PATCH] gpio: remove remaining users of gpiochip_remove() retval Linus Walleij
2014-09-17 15:34 ` Javier Martinez Canillas
2014-09-19 7:40 ` Alexandre Courbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).