net: ipa: kill IPA clock reference count
authorAlex Elder <elder@linaro.org>
Tue, 10 Aug 2021 19:27:03 +0000 (14:27 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Aug 2021 12:31:56 +0000 (13:31 +0100)
commita71aeff3dd0a7d127967d42a86b42b0aa21a90dc
tree774545c4c9c8f251739107eff6be2d61a5650a4c
parenta3d3e759a487008a78ea35daff1f390f4f9d0deb
net: ipa: kill IPA clock reference count

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: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_clock.c