aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorabdoulaye berthe <berthe.ab@gmail.com>2014-07-12 16:30:14 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-09-18 14:03:10 -0400
commit88d5e520aa9701eb3e4f46165e02097cc03d363a (patch)
tree443b8f89eeaf8933a9d3af2c9928cf0008aa35fd
parent2134cb997f2f1b2d960ad8705d67dc8d690ba59c (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>
-rw-r--r--arch/arm/common/scoop.c10
-rw-r--r--arch/mips/txx9/generic/setup.c4
-rw-r--r--arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c3
-rw-r--r--arch/sh/boards/mach-x3proto/gpio.c6
-rw-r--r--drivers/bcma/driver_gpio.c3
-rw-r--r--drivers/gpio/gpio-zynq.c3
-rw-r--r--drivers/hid/hid-cp2112.c6
-rw-r--r--drivers/input/keyboard/adp5588-keys.c4
-rw-r--r--drivers/input/keyboard/adp5589-keys.c4
-rw-r--r--drivers/input/touchscreen/ad7879.c10
-rw-r--r--drivers/leds/leds-pca9532.c10
-rw-r--r--drivers/leds/leds-tca6507.c7
-rw-r--r--drivers/media/dvb-frontends/cxd2820r_core.c10
-rw-r--r--drivers/mfd/asic3.c3
-rw-r--r--drivers/mfd/htc-i2cpld.c8
-rw-r--r--drivers/mfd/sm501.c17
-rw-r--r--drivers/mfd/tc6393xb.c13
-rw-r--r--drivers/mfd/ucb1x00-core.c8
-rw-r--r--drivers/platform/x86/intel_pmic_gpio.c3
-rw-r--r--drivers/ssb/driver_gpio.c3
-rw-r--r--drivers/staging/vme/devices/vme_pio2_gpio.c4
-rw-r--r--drivers/tty/serial/max310x.c10
-rw-r--r--drivers/video/fbdev/via/via-gpio.c10
-rw-r--r--sound/soc/codecs/wm5100.c5
-rw-r--r--sound/soc/codecs/wm8903.c6
-rw-r--r--sound/soc/codecs/wm8962.c5
-rw-r--r--sound/soc/codecs/wm8996.c6
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:
243static int scoop_remove(struct platform_device *pdev) 243static 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
792out_pdev: 793out_pdev:
793 platform_device_put(pdev); 794 platform_device_put(pdev);
794out_gpio: 795out_gpio:
795 if (gpiochip_remove(&iocled->chip)) 796 gpiochip_remove(&iocled->chip);
796 return;
797out_unmap: 797out_unmap:
798 iounmap(iocled->mmioaddr); 798 iounmap(iocled->mmioaddr);
799out_free: 799out_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
142static int mcu_gpiochip_remove(struct mcu *mcu) 142static 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
147static int mcu_probe(struct i2c_client *client, const struct i2c_device_id *id) 148static 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
130err_irq: 130err_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
135err_gpio: 133err_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)
251int bcma_gpio_unregister(struct bcma_drv_cc *cc) 251int 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
673err_rm_gpiochip: 673err_rm_gpiochip:
674 if (gpiochip_remove(chip)) 674 gpiochip_remove(chip);
675 dev_err(&pdev->dev, "Failed to remove gpio chip\n");
676err_disable_clk: 675err_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
1071err_gpiochip_remove: 1071err_gpiochip_remove:
1072 if (gpiochip_remove(&dev->gc) < 0) 1072 gpiochip_remove(&dev->gc);
1073 hid_err(hdev, "error removing gpio chip\n");
1074err_free_i2c: 1073err_free_i2c:
1075 i2c_del_adapter(&dev->adap); 1074 i2c_del_adapter(&dev->adap);
1076err_free_dev: 1075err_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
259static inline int adp5588_gpio_add(struct adp5588_kpad *kpad) 257static 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 }