Skip to contentSkip to conversation

mfd: cros_ec: Add missing free_irq in cros_ec_remove

PATCH In review Jeffy Chen 2 participants 3 messages Jun 12, 2017

Subsystems (2)
lore
Share & tools
lore

Jeffy Chen

author
#0 lore raw

PATCH 1/1 mfd: cros_ec: Add missing free_irq in cros_ec_remove

---

 drivers/mfd/cros_ec.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mfd/cros_ec.c +3 -0
index e31ac60..dc6ce90 100644
@@ -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);
Signature · 1 line
2.1.4
#1 lore raw

mfd: cros_ec: Add missing free_irq in cros_ec_remove

It would be better to use more English and less code in the patch's subject line. Something like "Clean-up IRQ on unbind" Or "Free IRQ on exit". Something of that nature.

Also, you should populate the commit log with what are you doing and why is it required.

Quoted 21 lines

---

 drivers/mfd/cros_ec.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mfd/cros_ec.c +3 -0
index e31ac60..dc6ce90 100644
@@ -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);
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
author
#2 lore raw

Hi Lee,

Quoted 8 lines · Lee Jones

mfd: cros_ec: Add missing free_irq in cros_ec_remove

It would be better to use more English and less code in the patch's subject line. Something like "Clean-up IRQ on unbind" Or "Free IRQ on exit". Something of that nature.

Also, you should populate the commit log with what are you doing and why is it required.

oh, right, thanks for your comment, i'll rewrite it :)

Quoted 23 lines
Quoted 22 lines

---

  drivers/mfd/cros_ec.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/mfd/cros_ec.c +3 -0
index e31ac60..dc6ce90 100644
@@ -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);