From fe3f58c15f51409b24d647d6b51ee0f6aeb67ccb Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 27 May 2016 02:56:24 +0200 Subject: [PATCH] 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. --- bbswitch_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bbswitch_dev.c b/bbswitch_dev.c index cdfce65..227d171 100644 --- a/bbswitch_dev.c +++ b/bbswitch_dev.c @@ -38,6 +38,7 @@ static void bbswitch_pci_remove(struct pci_dev *dev) { pm_runtime_get_noresume(&dev->dev); pm_runtime_dont_use_autosuspend(&dev->dev); + pm_runtime_forbid(&dev->dev); } static int bbswitch_runtime_suspend(struct device *dev) {