Skip to contentSkip to conversation

patch "usb: roles: intel_xhci: Fix Unbalanced pm_runtime_enable" added to usb-linus

PATCH [email protected] 1 participant 1 message Oct 13, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: roles: intel_xhci: Fix Unbalanced pm_runtime_enable

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From 009b1948e153ae448f62f1887e2b58d0e05db51b Mon Sep 17 00:00:00 2001

From: Wan Ahmad Zainie <[email protected]>
Date: Tue, 9 Oct 2018 12:52:47 +0800
Subject: usb: roles: intel_xhci: Fix Unbalanced pm_runtime_enable

Add missing pm_runtime_disable() to remove(), in order to avoid an Unbalanced pm_runtime_enable when the module is removed and re-probed.

Error log:

root@intel-corei7-64:~# modprobe -r intel_xhci_usb_role_switch
root@intel-corei7-64:~# modprobe intel_xhci_usb_role_switch
intel_xhci_usb_sw intel_xhci_usb_sw: Unbalanced pm_runtime_enable!
Fixes cb2968468605 (usb: roles: intel_xhci: Enable runtime PM)
---
 drivers/usb/roles/intel-xhci-usb-role-switch.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/roles/intel-xhci-usb-role-switch.c +2 -0
index 1fb3dd0f1dfa..277de96181f9 100644
@@ -161,6 +161,8 @@ static int intel_xhci_usb_remove(struct platform_device *pdev)
 {
 	struct intel_xhci_usb_data *data = platform_get_drvdata(pdev);
 
+	pm_runtime_disable(&pdev->dev);
+
 	usb_role_switch_unregister(data->role_sw);
 	return 0;
 }
Signature · 1 line
2.19.1