aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-renesas-irqc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/irqchip/irq-renesas-irqc.c')
-rw-r--r--drivers/irqchip/irq-renesas-irqc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index 44fe04a8da95..2fe9612041b0 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -29,6 +29,7 @@
29#include <linux/slab.h> 29#include <linux/slab.h>
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/platform_data/irq-renesas-irqc.h> 31#include <linux/platform_data/irq-renesas-irqc.h>
32#include <linux/pm_runtime.h>
32 33
33#define IRQC_IRQ_MAX 32 /* maximum 32 interrupts per driver instance */ 34#define IRQC_IRQ_MAX 32 /* maximum 32 interrupts per driver instance */
34 35
@@ -180,6 +181,9 @@ static int irqc_probe(struct platform_device *pdev)
180 p->pdev = pdev; 181 p->pdev = pdev;
181 platform_set_drvdata(pdev, p); 182 platform_set_drvdata(pdev, p);
182 183
184 pm_runtime_enable(&pdev->dev);
185 pm_runtime_get_sync(&pdev->dev);
186
183 /* get hold of manadatory IOMEM */ 187 /* get hold of manadatory IOMEM */
184 io = platform_get_resource(pdev, IORESOURCE_MEM, 0); 188 io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
185 if (!io) { 189 if (!io) {
@@ -260,6 +264,8 @@ err3:
260err2: 264err2:
261 iounmap(p->iomem); 265 iounmap(p->iomem);
262err1: 266err1:
267 pm_runtime_put(&pdev->dev);
268 pm_runtime_disable(&pdev->dev);
263 kfree(p); 269 kfree(p);
264err0: 270err0:
265 return ret; 271 return ret;
@@ -275,6 +281,8 @@ static int irqc_remove(struct platform_device *pdev)
275 281
276 irq_domain_remove(p->irq_domain); 282 irq_domain_remove(p->irq_domain);
277 iounmap(p->iomem); 283 iounmap(p->iomem);
284 pm_runtime_put(&pdev->dev);
285 pm_runtime_disable(&pdev->dev);
278 kfree(p); 286 kfree(p);
279 return 0; 287 return 0;
280} 288}