mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] mfd: cros_ec: Free IRQ on exit
@ 2017-06-12  8:42 Jeffy Chen
  2017-06-19 14:51 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffy Chen @ 2017-06-12  8:42 UTC (permalink / raw)
  To: linux-kernel, lee.jones; +Cc: briannorris, dtor, dianders, Jeffy Chen

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>

---

Changes in v2:
Improve the commit message.

 drivers/mfd/cros_ec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
index e31ac60..dc6ce90 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);
-- 
2.1.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-19 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12  8:42 [PATCH v2] mfd: cros_ec: Free IRQ on exit Jeffy Chen
2017-06-19 14:51 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®