Skip to contentSkip to conversation

phy-sun4i-usb: Fix irq free conditions to match request conditions

PATCH New Hans de Goede 3 participants 3 messages Jun 18, 2016 – Jun 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 phy-sun4i-usb: Fix irq free conditions to match request conditions

commit 5cf700ac9d50("phy: phy-sun4i-usb: Fix optional gpios failing probe") changed the condition under which irqs are requested, but omitted matching changes to sun4i_usb_phy_remove(). This commit fixes this.

Fixes commit 5cf700ac9d50("phy: phy-sun4i-usb: Fix optional gpios failing probe")
---
 drivers/phy/phy-sun4i-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/phy-sun4i-usb.c +2 -2
index 8c2570d..8c7eb33 100644
@@ -548,9 +548,9 @@ static int sun4i_usb_phy_remove(struct platform_device *pdev)
 
 	if (data->vbus_power_nb_registered)
 		power_supply_unreg_notifier(&data->vbus_power_nb);
-	if (data->id_det_irq >= 0)
+	if (data->id_det_irq > 0)
 		devm_free_irq(dev, data->id_det_irq, data);
-	if (data->vbus_det_irq >= 0)
+	if (data->vbus_det_irq > 0)
 		devm_free_irq(dev, data->vbus_det_irq, data);
 
 	cancel_delayed_work_sync(&data->detect);
Signature · 1 line
2.7.4
#1 lore raw

PATCH v5 1/1 phy-sun4i-usb: Fix irq free conditions to match request conditions

Quoted 5 lines · Hans de Goede

commit 5cf700ac9d50("phy: phy-sun4i-usb: Fix optional gpios failing probe") changed the condition under which irqs are requested, but omitted matching changes to sun4i_usb_phy_remove(). This commit fixes this.

Fixes commit 5cf700ac9d50("phy: phy-sun4i-usb: Fix optional gpios failing probe")

"Commit" not needed here, this tag has a standardized format.

Quoted 1 line

[...]

MBR, Sergei

#2 lore raw

PATCH v5 1/1 phy-sun4i-usb: Fix irq free conditions to match request conditions

Hi,

Quoted 10 lines · Sergei Shtylyov
Quoted 6 lines · Hans de Goede

commit 5cf700ac9d50("phy: phy-sun4i-usb: Fix optional gpios failing probe") changed the condition under which irqs are requested, but omitted matching changes to sun4i_usb_phy_remove(). This commit fixes this.

Fixes commit 5cf700ac9d50("phy: phy-sun4i-usb: Fix optional gpios failing

probe")

"Commit" not needed here, this tag has a standardized format.

Fixed it myself and applied.

Thanks
Kishon