summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffy Chen <jeffy.chen@rock-chips.com>2017-06-12 10:42:46 +0200
committerLee Jones <lee.jones@linaro.org>2017-07-06 09:29:13 +0200
commitf58b14e6632a07ea1eb89aedb5e27cc55d251826 (patch)
tree136f2f20ab82fa332aac0d68322ff87ed442c583
parentdt-bindings: vendor-prefixes: Add arctic to vendor prefix (diff)
downloadlinux-f58b14e6632a07ea1eb89aedb5e27cc55d251826.tar.xz
linux-f58b14e6632a07ea1eb89aedb5e27cc55d251826.zip
mfd: cros_ec: Free IRQ on exit
Currently we request the irq when probing, but never free it. So after unbind ec driver, this irq will be left requested, which would break the next bind: [ 2683.338437] genirq: Flags mismatch irq 64. 00002008 (chromeos-ec) vs. 00002008 (chromeos-ec) [ 2683.338591] cros-ec-spi spi5.0: request irq 64: error -16 [ 2683.338610] cros-ec-spi spi5.0: cannot register EC [ 2683.338656] cros-ec-spi: probe of spi5.0 failed with error -16 Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/cros_ec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
index e31ac60a7623..dc6ce9091694 100644
--- a/drivers/mfd/cros_ec.c
+++ b/drivers/mfd/cros_ec.c
@@ -183,6 +183,9 @@ int cros_ec_remove(struct cros_ec_device *ec_dev)
cros_ec_acpi_remove_gpe_handler();
+ if (ec_dev->irq)
+ free_irq(ec_dev->irq, ec_dev);
+
return 0;
}
EXPORT_SYMBOL(cros_ec_remove);