bbswitch_dev: disable runtime PM on removal

Call pm_runtime_forbid() to balance it with pm_runtime_allow(), this
ensures that the runtime usage counter before loading and after
unloading match.
acpi-pr3
Peter Wu 9 years ago
parent fb3d5a614a
commit fe3f58c15f

@ -38,6 +38,7 @@ static void bbswitch_pci_remove(struct pci_dev *dev)
{ {
pm_runtime_get_noresume(&dev->dev); pm_runtime_get_noresume(&dev->dev);
pm_runtime_dont_use_autosuspend(&dev->dev); pm_runtime_dont_use_autosuspend(&dev->dev);
pm_runtime_forbid(&dev->dev);
} }
static int bbswitch_runtime_suspend(struct device *dev) { static int bbswitch_runtime_suspend(struct device *dev) {

Loading…
Cancel
Save