Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jeffy Chen and committed by
Lee Jones
f58b14e6 91ab076e

+3
+3
drivers/mfd/cros_ec.c
··· 183 183 184 184 cros_ec_acpi_remove_gpe_handler(); 185 185 186 + if (ec_dev->irq) 187 + free_irq(ec_dev->irq, ec_dev); 188 + 186 189 return 0; 187 190 } 188 191 EXPORT_SYMBOL(cros_ec_remove);