• Alex Elder's avatar
    net: ipa: kill IPA clock reference count · a71aeff3
    Alex Elder authored
    The runtime power management core code maintains a usage count.  This
    count mirrors the IPA clock reference count, and there's no need to
    maintain both.  So get rid of the IPA clock reference count and just
    rely on the runtime PM usage count to determine when the hardware
    should be suspended or resumed.
    
    Use pm_runtime_get_if_active() in ipa_clock_get_additional().  We
    care whether power is active, regardless of whether it's in use, so
    pass true for its ign_usage_count argument.
    
    The IPA clock mutex is just used to make enabling/disabling the
    clock and updating the reference count occur atomically.  Without
    the reference count, there's no need for the mutex, so get rid of
    that too.
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a71aeff3
ipa_clock.c 9.72 KB