• Luca Coelho's avatar
    iwlwifi: pcie: forbid RTPM on device removal · 4479a899
    Luca Coelho authored
    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: default avatarLuca Coelho <luciano.coelho@intel.com>
    Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
    4479a899
drv.c 34.5 KB