Commit 0d08026a authored by Alex Elder's avatar Alex Elder Committed by David S. Miller

net: ipa: kill ipa_clock_get_additional()

Now that ipa_clock_get_additional() is a trivial wrapper around
pm_runtime_get_if_active(), just open-code it in its only caller
and delete the function.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a71aeff3
...@@ -264,15 +264,6 @@ static int ipa_runtime_idle(struct device *dev) ...@@ -264,15 +264,6 @@ static int ipa_runtime_idle(struct device *dev)
return -EAGAIN; return -EAGAIN;
} }
/* Get an IPA clock reference, but only if the reference count is
* already non-zero. Returns true if the additional reference was
* added successfully, or false otherwise.
*/
bool ipa_clock_get_additional(struct ipa *ipa)
{
return pm_runtime_get_if_active(&ipa->pdev->dev, true) > 0;
}
/* Get an IPA clock reference. If the reference count is non-zero, it is /* Get an IPA clock reference. If the reference count is non-zero, it is
* incremented and return is immediate. Otherwise the IPA clock is * incremented and return is immediate. Otherwise the IPA clock is
* enabled. * enabled.
......
...@@ -62,16 +62,6 @@ void ipa_clock_exit(struct ipa_clock *clock); ...@@ -62,16 +62,6 @@ void ipa_clock_exit(struct ipa_clock *clock);
*/ */
int ipa_clock_get(struct ipa *ipa); int ipa_clock_get(struct ipa *ipa);
/**
* ipa_clock_get_additional() - Get an IPA clock reference if not first
* @ipa: IPA pointer
*
* Return: true if reference taken, false otherwise
*
* This returns immediately, and only takes a reference if not the first
*/
bool ipa_clock_get_additional(struct ipa *ipa);
/** /**
* ipa_clock_put() - Drop an IPA clock reference * ipa_clock_put() - Drop an IPA clock reference
* @ipa: IPA pointer * @ipa: IPA pointer
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/panic_notifier.h> #include <linux/panic_notifier.h>
#include <linux/pm_runtime.h>
#include <linux/soc/qcom/smem.h> #include <linux/soc/qcom/smem.h>
#include <linux/soc/qcom/smem_state.h> #include <linux/soc/qcom/smem_state.h>
...@@ -84,13 +85,15 @@ struct ipa_smp2p { ...@@ -84,13 +85,15 @@ struct ipa_smp2p {
*/ */
static void ipa_smp2p_notify(struct ipa_smp2p *smp2p) static void ipa_smp2p_notify(struct ipa_smp2p *smp2p)
{ {
struct device *dev;
u32 value; u32 value;
u32 mask; u32 mask;
if (smp2p->notified) if (smp2p->notified)
return; return;
smp2p->clock_on = ipa_clock_get_additional(smp2p->ipa); dev = &smp2p->ipa->pdev->dev;
smp2p->clock_on = pm_runtime_get_if_active(dev, true) > 0;
/* Signal whether the clock is enabled */ /* Signal whether the clock is enabled */
mask = BIT(smp2p->enabled_bit); mask = BIT(smp2p->enabled_bit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment