]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4f94ad4b34cc3c0deca43c75c0c51981da0d7ed0
tree774545c4c9c8f251739107eff6be2d61a5650a4c
parented95f4930b26d4f27ed5e97a42c117200743cb65
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