diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-09-16 18:11:41 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-09-23 11:51:17 -0400 |
commit | da26d5d803e45a30c7d72b83ce906f3a466f4cc3 (patch) | |
tree | 43b7bac272c85efd85c037e0343d264ff923c443 /drivers/gpio | |
parent | 2fcea6cecbc965b4e02a39537d9d939f5251bbbd (diff) |
gpio: 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>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-crystalcove.c | 9 | ||||
-rw-r--r-- | drivers/gpio/gpio-omap.c | 2 | ||||
-rw-r--r-- | drivers/gpio/gpio-xgene.c | 7 | ||||
-rw-r--r-- | 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) | |||
346 | return 0; | 346 | return 0; |
347 | 347 | ||
348 | out_remove_gpio: | 348 | out_remove_gpio: |
349 | WARN_ON(gpiochip_remove(&cg->chip)); | 349 | gpiochip_remove(&cg->chip); |
350 | return retval; | 350 | return retval; |
351 | } | 351 | } |
352 | 352 | ||
@@ -354,14 +354,11 @@ static int crystalcove_gpio_remove(struct platform_device *pdev) | |||
354 | { | 354 | { |
355 | struct crystalcove_gpio *cg = platform_get_drvdata(pdev); | 355 | struct crystalcove_gpio *cg = platform_get_drvdata(pdev); |
356 | int irq = platform_get_irq(pdev, 0); | 356 | int irq = platform_get_irq(pdev, 0); |
357 | int err; | ||
358 | |||
359 | err = gpiochip_remove(&cg->chip); | ||
360 | 357 | ||
358 | gpiochip_remove(&cg->chip); | ||
361 | if (irq >= 0) | 359 | if (irq >= 0) |
362 | free_irq(irq, cg); | 360 | free_irq(irq, cg); |
363 | 361 | return 0; | |
364 | return err; | ||
365 | } | 362 | } |
366 | 363 | ||
367 | static struct platform_driver crystalcove_gpio_driver = { | 364 | 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) | |||
1143 | 1143 | ||
1144 | if (ret) { | 1144 | if (ret) { |
1145 | dev_err(bank->dev, "Couldn't add irqchip to gpiochip %d\n", ret); | 1145 | dev_err(bank->dev, "Couldn't add irqchip to gpiochip %d\n", ret); |
1146 | ret = gpiochip_remove(&bank->chip); | 1146 | gpiochip_remove(&bank->chip); |
1147 | return -ENODEV; | 1147 | return -ENODEV; |
1148 | } | 1148 | } |
1149 | 1149 | ||
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: | |||
216 | static int xgene_gpio_remove(struct platform_device *pdev) | 216 | static int xgene_gpio_remove(struct platform_device *pdev) |
217 | { | 217 | { |
218 | struct xgene_gpio *gpio = platform_get_drvdata(pdev); | 218 | struct xgene_gpio *gpio = platform_get_drvdata(pdev); |
219 | int ret = 0; | ||
220 | 219 | ||
221 | ret = gpiochip_remove(&gpio->chip); | 220 | gpiochip_remove(&gpio->chip); |
222 | if (ret) | 221 | return 0; |
223 | dev_err(&pdev->dev, "unable to remove gpio_chip.\n"); | ||
224 | return ret; | ||
225 | } | 222 | } |
226 | 223 | ||
227 | #ifdef CONFIG_OF | 224 | #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: | |||
686 | */ | 686 | */ |
687 | static int zynq_gpio_remove(struct platform_device *pdev) | 687 | static int zynq_gpio_remove(struct platform_device *pdev) |
688 | { | 688 | { |
689 | int ret; | ||
690 | struct zynq_gpio *gpio = platform_get_drvdata(pdev); | 689 | struct zynq_gpio *gpio = platform_get_drvdata(pdev); |
691 | 690 | ||
692 | pm_runtime_get_sync(&pdev->dev); | 691 | pm_runtime_get_sync(&pdev->dev); |
693 | 692 | gpiochip_remove(&gpio->chip); | |
694 | ret = gpiochip_remove(&gpio->chip); | ||
695 | if (ret) { | ||
696 | dev_err(&pdev->dev, "Failed to remove gpio chip\n"); | ||
697 | return ret; | ||
698 | } | ||
699 | clk_disable_unprepare(gpio->clk); | 693 | clk_disable_unprepare(gpio->clk); |
700 | device_set_wakeup_capable(&pdev->dev, 0); | 694 | device_set_wakeup_capable(&pdev->dev, 0); |
701 | return 0; | 695 | return 0; |