]> 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)
commitd698d9f7a586ad9f14aa51da74e95e8364f51e90
tree5bd61c0a9e8644e8d877f460eb8b22423e4d2e3e
parent14725fc09dea1c8bee1d57537fe3aa73cb7f3108
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