]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: pcie: forbid RTPM on device removal
authorLuca Coelho <luciano.coelho@intel.com>
Mon, 8 Feb 2016 09:18:46 +0000 (11:18 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 6 Mar 2016 19:59:48 +0000 (21:59 +0200)
commite510d869938effe874b2fade0dfed6f613ddf54c
tree5bd61c0a9e8644e8d877f460eb8b22423e4d2e3e
parentdfc34a514dfdf1528697be74bde7b18d7180cd10
iwlwifi: pcie: forbid RTPM on device removal

The pci driver keeps any unbound device in active state and forbids
runtime PM.  When our driver gets probed, we take control of the
state.  When the device is released (i.e. during unbind or module
removal), we should return the state to what it was before.  To do so,
we need to forbid RTPM in the driver remove op.

Additionally, remove an unnecessary pm_runtime_disable() call, move
the initial ref_count setting to a better place and add some comments
explaining what is going on.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/drv.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c