]> 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)
commitb2e20bd411103d0c266d9882108d60ac6e41724a
tree774545c4c9c8f251739107eff6be2d61a5650a4c
parent0238bbc43aeed15096614cef79b7ef73a2000278
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