diff options
author | Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com> | 2018-10-09 00:52:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-09 10:13:42 -0400 |
commit | 009b1948e153ae448f62f1887e2b58d0e05db51b (patch) | |
tree | b18d0d38a789000eb1c39c3b1b13f3aa2d1af58b | |
parent | f976d0e5747ca65ccd0fb2a4118b193d70aa1836 (diff) |
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)
Cc: <stable@vger.kernel.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/roles/intel-xhci-usb-role-switch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/roles/intel-xhci-usb-role-switch.c b/drivers/usb/roles/intel-xhci-usb-role-switch.c index 1fb3dd0f1dfa..277de96181f9 100644 --- a/drivers/usb/roles/intel-xhci-usb-role-switch.c +++ b/drivers/usb/roles/intel-xhci-usb-role-switch.c | |||
@@ -161,6 +161,8 @@ static int intel_xhci_usb_remove(struct platform_device *pdev) | |||
161 | { | 161 | { |
162 | struct intel_xhci_usb_data *data = platform_get_drvdata(pdev); | 162 | struct intel_xhci_usb_data *data = platform_get_drvdata(pdev); |
163 | 163 | ||
164 | pm_runtime_disable(&pdev->dev); | ||
165 | |||
164 | usb_role_switch_unregister(data->role_sw); | 166 | usb_role_switch_unregister(data->role_sw); |
165 | return 0; | 167 | return 0; |
166 | } | 168 | } |