diff options
author | Alex Elder <elder@linaro.org> | 2021-08-10 21:26:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-11 14:31:55 +0200 |
commit | 1016c6b8c62152eaa9ad31a9905a816e58333afa (patch) | |
tree | 07475f612c19960b629e0592f63f8d0d0a9e504b /drivers/net/ipa/ipa_clock.c | |
parent | net: ipa: have ipa_clock_get() return a value (diff) | |
download | linux-1016c6b8c62152eaa9ad31a9905a816e58333afa.tar.xz linux-1016c6b8c62152eaa9ad31a9905a816e58333afa.zip |
net: ipa: disable clock in suspend
Disable the IPA clock rather than dropping a reference to it in the
system suspend callback. This forces the suspend to occur without
affecting existing references.
Similarly, enable the clock rather than taking a reference in
ipa_resume(), forcing a resume without changing the reference count.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ipa/ipa_clock.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/ipa/ipa_clock.c b/drivers/net/ipa/ipa_clock.c index d5a8b45ee59d..864991f7ba4b 100644 --- a/drivers/net/ipa/ipa_clock.c +++ b/drivers/net/ipa/ipa_clock.c @@ -414,7 +414,7 @@ static int ipa_suspend(struct device *dev) gsi_suspend(&ipa->gsi); } - return ipa_clock_put(ipa); + return ipa_clock_disable(ipa); } /** @@ -432,14 +432,9 @@ static int ipa_resume(struct device *dev) struct ipa *ipa = dev_get_drvdata(dev); int ret; - /* This clock reference will keep the IPA out of suspend - * until we get a power management suspend request. - */ - ret = ipa_clock_get(ipa); - if (WARN_ON(ret < 0)) { - (void)ipa_clock_put(ipa); + ret = ipa_clock_enable(ipa); + if (WARN_ON(ret < 0)) return ret; - } /* Endpoints aren't usable until setup is complete */ if (ipa->setup_complete) { |