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.
This commit is contained in:
Peter Wu 2016-05-27 02:56:24 +02:00
parent fb3d5a614a
commit fe3f58c15f

View File

@ -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) {