summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/ipa_interrupt.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2021-08-20 01:19:27 +0300
committerDavid S. Miller <davem@davemloft.net>2021-08-20 16:45:47 +0300
commitc3f115aa5e1b6459e2ccd711277435397dd7c6e9 (patch)
tree665dd48ccd9e3e733c54b94320070076f653d4fb /drivers/net/ipa/ipa_interrupt.c
parent724c2d743688f296263df0223c3d95987dfc427b (diff)
downloadlinux-c3f115aa5e1b6459e2ccd711277435397dd7c6e9.tar.xz
net: ipa: kill ipa_clock_get()
The only remaining user of the ipa_clock_{get,put}() interface is ipa_isr_thread(). Replace calls to ipa_clock_get() there calling pm_runtime_get_sync() instead. And call pm_runtime_put() there rather than ipa_clock_put(). Warn if we ever get an error. With that, we can get rid of ipa_clock_get() and ipa_clock_put(). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_interrupt.c')
-rw-r--r--drivers/net/ipa/ipa_interrupt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ipa/ipa_interrupt.c b/drivers/net/ipa/ipa_interrupt.c
index 934c14e066a0..3fecaadb4a37 100644
--- a/drivers/net/ipa/ipa_interrupt.c
+++ b/drivers/net/ipa/ipa_interrupt.c
@@ -21,9 +21,9 @@
#include <linux/types.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
#include "ipa.h"
-#include "ipa_clock.h"
#include "ipa_reg.h"
#include "ipa_endpoint.h"
#include "ipa_interrupt.h"
@@ -80,14 +80,16 @@ static irqreturn_t ipa_isr_thread(int irq, void *dev_id)
struct ipa_interrupt *interrupt = dev_id;
struct ipa *ipa = interrupt->ipa;
u32 enabled = interrupt->enabled;
+ struct device *dev;
u32 pending;
u32 offset;
u32 mask;
int ret;
- ret = ipa_clock_get(ipa);
+ dev = &ipa->pdev->dev;
+ ret = pm_runtime_get_sync(dev);
if (WARN_ON(ret < 0))
- goto out_clock_put;
+ goto out_power_put;
/* The status register indicates which conditions are present,
* including conditions whose interrupt is not enabled. Handle
@@ -108,15 +110,13 @@ static irqreturn_t ipa_isr_thread(int irq, void *dev_id)
/* If any disabled interrupts are pending, clear them */
if (pending) {
- struct device *dev = &ipa->pdev->dev;
-
dev_dbg(dev, "clearing disabled IPA interrupts 0x%08x\n",
pending);
offset = ipa_reg_irq_clr_offset(ipa->version);
iowrite32(pending, ipa->reg_virt + offset);
}
-out_clock_put:
- (void)ipa_clock_put(ipa);
+out_power_put:
+ (void)pm_runtime_put(dev);
return IRQ_HANDLED;
}