diff options
| author | abdoulaye berthe <berthe.ab@gmail.com> | 2014-07-12 16:30:14 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2014-09-18 14:03:10 -0400 |
| commit | 88d5e520aa9701eb3e4f46165e02097cc03d363a (patch) | |
| tree | 443b8f89eeaf8933a9d3af2c9928cf0008aa35fd | |
| parent | 2134cb997f2f1b2d960ad8705d67dc8d690ba59c (diff) | |
driver:gpio remove all usage of gpio_remove retval in driver
this remove all reference to gpio_remove retval in all driver
except pinctrl and gpio. the same thing is done for gpio and
pinctrl in two different patches.
Signed-off-by: Abdoulaye Berthe <berthe.ab@gmail.com>
Acked-by: Michael Büsch <m@bues.ch>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
27 files changed, 52 insertions, 129 deletions
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index a20fa80776d3..45f4c21e393c 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
| @@ -243,18 +243,12 @@ err_ioremap: | |||
| 243 | static int scoop_remove(struct platform_device *pdev) | 243 | static int scoop_remove(struct platform_device *pdev) |
| 244 | { | 244 | { |
| 245 | struct scoop_dev *sdev = platform_get_drvdata(pdev); | 245 | struct scoop_dev *sdev = platform_get_drvdata(pdev); |
| 246 | int ret; | ||
| 247 | 246 | ||
| 248 | if (!sdev) | 247 | if (!sdev) |
| 249 | return -EINVAL; | 248 | return -EINVAL; |
| 250 | 249 | ||
| 251 | if (sdev->gpio.base != -1) { | 250 | if (sdev->gpio.base != -1) |
| 252 | ret = gpiochip_remove(&sdev->gpio); | 251 | gpiochip_remove(&sdev->gpio); |
| 253 | if (ret) { | ||
| 254 | dev_err(&pdev->dev, "Can't remove gpio chip: %d\n", ret); | ||
| 255 | return ret; | ||
| 256 | } | ||
| 257 | } | ||
| 258 | 252 | ||
| 259 | platform_set_drvdata(pdev, NULL); | 253 | platform_set_drvdata(pdev, NULL); |
| 260 | iounmap(sdev->base); | 254 | iounmap(sdev->base); |
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 9ff200ae1c9a..2791b8641df6 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
| @@ -789,11 +789,11 @@ void __init txx9_iocled_init(unsigned long baseaddr, | |||
| 789 | if (platform_device_add(pdev)) | 789 | if (platform_device_add(pdev)) |
| 790 | goto out_pdev; | 790 | goto out_pdev; |
| 791 | return; | 791 | return; |
| 792 | |||
| 792 | out_pdev: | 793 | out_pdev: |
| 793 | platform_device_put(pdev); | 794 | platform_device_put(pdev); |
| 794 | out_gpio: | 795 | out_gpio: |
| 795 | if (gpiochip_remove(&iocled->chip)) | 796 | gpiochip_remove(&iocled->chip); |
| 796 | return; | ||
| 797 | out_unmap: | 797 | out_unmap: |
| 798 | iounmap(iocled->mmioaddr); | 798 | iounmap(iocled->mmioaddr); |
| 799 | out_free: | 799 | out_free: |
diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c index e238b6a55b15..73997027b085 100644 --- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c +++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | |||
| @@ -141,7 +141,8 @@ static int mcu_gpiochip_add(struct mcu *mcu) | |||
| 141 | 141 | ||
| 142 | static int mcu_gpiochip_remove(struct mcu *mcu) | 142 | static int mcu_gpiochip_remove(struct mcu *mcu) |
| 143 | { | 143 | { |
| 144 | return gpiochip_remove(&mcu->gc); | 144 | gpiochip_remove(&mcu->gc); |
| 145 | return 0; | ||
| 145 | } | 146 | } |
| 146 | 147 | ||
| 147 | static int mcu_probe(struct i2c_client *client, const struct i2c_device_id *id) | 148 | static int mcu_probe(struct i2c_client *client, const struct i2c_device_id *id) |
diff --git a/arch/sh/boards/mach-x3proto/gpio.c b/arch/sh/boards/mach-x3proto/gpio.c index 3ea65e9b56e8..f035a7ac6456 100644 --- a/arch/sh/boards/mach-x3proto/gpio.c +++ b/arch/sh/boards/mach-x3proto/gpio.c | |||
| @@ -128,10 +128,8 @@ int __init x3proto_gpio_setup(void) | |||
| 128 | return 0; | 128 | return 0; |
| 129 | 129 | ||
| 130 | err_irq: | 130 | err_irq: |
| 131 | ret = gpiochip_remove(&x3proto_gpio_chip); | 131 | gpiochip_remove(&x3proto_gpio_chip); |
| 132 | if (unlikely(ret)) | 132 | ret = 0; |
| 133 | pr_err("Failed deregistering GPIO\n"); | ||
| 134 | |||
| 135 | err_gpio: | 133 | err_gpio: |
| 136 | synchronize_irq(ilsel); | 134 | synchronize_irq(ilsel); |
| 137 | 135 | ||
diff --git a/drivers/bcma/driver_gpio.c b/drivers/bcma/driver_gpio.c index aec9f850b4a8..710fa62dd5ae 100644 --- a/drivers/bcma/driver_gpio.c +++ b/drivers/bcma/driver_gpio.c | |||
| @@ -251,5 +251,6 @@ int bcma_gpio_init(struct bcma_drv_cc *cc) | |||
| 251 | int bcma_gpio_unregister(struct bcma_drv_cc *cc) | 251 | int bcma_gpio_unregister(struct bcma_drv_cc *cc) |
| 252 | { | 252 | { |
| 253 | bcma_gpio_irq_domain_exit(cc); | 253 | bcma_gpio_irq_domain_exit(cc); |
| 254 | return gpiochip_remove(&cc->gpio); | 254 | gpiochip_remove(&cc->gpio); |
| 255 | return 0; | ||
| 255 | } | 256 | } |
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index 1e6f19a07454..5dfbced24815 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c | |||
| @@ -671,8 +671,7 @@ static int zynq_gpio_probe(struct platform_device *pdev) | |||
| 671 | return 0; | 671 | return 0; |
| 672 | 672 | ||
| 673 | err_rm_gpiochip: | 673 | err_rm_gpiochip: |
| 674 | if (gpiochip_remove(chip)) | 674 | gpiochip_remove(chip); |
| 675 | dev_err(&pdev->dev, "Failed to remove gpio chip\n"); | ||
| 676 | err_disable_clk: | 675 | err_disable_clk: |
| 677 | clk_disable_unprepare(gpio->clk); | 676 | clk_disable_unprepare(gpio->clk); |
| 678 | 677 | ||
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c index a822db5a8338..3318de690e00 100644 --- a/drivers/hid/hid-cp2112.c +++ b/drivers/hid/hid-cp2112.c | |||
| @@ -1069,8 +1069,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
| 1069 | return ret; | 1069 | return ret; |
| 1070 | 1070 | ||
| 1071 | err_gpiochip_remove: | 1071 | err_gpiochip_remove: |
| 1072 | if (gpiochip_remove(&dev->gc) < 0) | 1072 | gpiochip_remove(&dev->gc); |
| 1073 | hid_err(hdev, "error removing gpio chip\n"); | ||
| 1074 | err_free_i2c: | 1073 | err_free_i2c: |
| 1075 | i2c_del_adapter(&dev->adap); | 1074 | i2c_del_adapter(&dev->adap); |
| 1076 | err_free_dev: | 1075 | err_free_dev: |
| @@ -1089,8 +1088,7 @@ static void cp2112_remove(struct hid_device *hdev) | |||
| 1089 | struct cp2112_device *dev = hid_get_drvdata(hdev); | 1088 | struct cp2112_device *dev = hid_get_drvdata(hdev); |
| 1090 | 1089 | ||
| 1091 | sysfs_remove_group(&hdev->dev.kobj, &cp2112_attr_group); | 1090 | sysfs_remove_group(&hdev->dev.kobj, &cp2112_attr_group); |
| 1092 | if (gpiochip_remove(&dev->gc)) | 1091 | gpiochip_remove(&dev->gc); |
| 1093 | hid_err(hdev, "unable to remove gpio chip\n"); | ||
| 1094 | i2c_del_adapter(&dev->adap); | 1092 | i2c_del_adapter(&dev->adap); |
| 1095 | /* i2c_del_adapter has finished removing all i2c devices from our | 1093 | /* i2c_del_adapter has finished removing all i2c devices from our |
| 1096 | * adapter. Well behaved devices should no longer call our cp2112_xfer | 1094 | * adapter. Well behaved devices should no longer call our cp2112_xfer |
diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c index 5ef7fcf0e250..b97ed443e0a4 100644 --- a/drivers/input/keyboard/adp5588-keys.c +++ b/drivers/input/keyboard/adp5588-keys.c | |||
| @@ -251,9 +251,7 @@ static void adp5588_gpio_remove(struct adp5588_kpad *kpad) | |||
| 251 | dev_warn(dev, "teardown failed %d\n", error); | 251 | dev_warn(dev, "teardown failed %d\n", error); |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | error = gpiochip_remove(&kpad->gc); | 254 | gpiochip_remove(&kpad->gc); |
| 255 | if (error) | ||
| 256 | dev_warn(dev, "gpiochip_remove failed %d\n", error); | ||
| 257 | } | 255 | } |
| 258 | #else | 256 | #else |
| 259 | static inline int adp5588_gpio_add(struct adp5588_kpad *kpad) | 257 | static inline int adp5588_gpio_add(struct adp5588_kpad *kpad) |
diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c index 6329549bf6ad..a45267729dfc 100644 --- a/drivers/input/keyboard/adp5589-keys.c +++ b/drivers/input/keyboard/adp5589-keys.c | |||
| @@ -567,9 +567,7 @@ static void adp5589_gpio_remove(struct adp5589_kpad *kpad) | |||
| 567 | dev_warn(dev, "teardown failed %d\n", error); | 567 | dev_warn(dev, "teardown failed %d\n", error); |
| 568 | } | ||
