OSDN Git Service

net: ipa: don't use ipa_clock_get() in "ipa_main.c"
authorAlex Elder <elder@linaro.org>
Thu, 19 Aug 2021 22:19:23 +0000 (17:19 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Aug 2021 13:45:47 +0000 (14:45 +0100)
commit4c6a4da84431415b1f451e2715a17487f9b3474e
tree037b3b8237031b9bb0b6d7604ec5b2a758463961
parentb8e36e13ea5e464414b3e6465045cf0689500448
net: ipa: don't use ipa_clock_get() in "ipa_main.c"

We need the hardware to be powered starting at the config stage of
initialization when the IPA driver probes.  And we need it powered
when the driver is removed, at least until the deconfig stage has
completed.

Replace callers of ipa_clock_get() in ipa_probe() and ipa_exit(),
calling pm_runtime_get_sync() instead.  Replace the corresponding
callers of ipa_clock_put(), calling pm_runtime_put() instead.

The only error we expect when getting power would occur when the
system is suspended.  The ->probe and ->remove driver callbacks
won't be called when suspended, so issue a WARN() call if an error
is seen getting power.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_main.c