lkml.org 
[lkml]   [2020]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 6/6] irqchip: keystone: use irq_domain_dispose_mappings()
Date
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Shrink the code a bit by using the new irq_domain_dispose_mappings()
helper.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
drivers/irqchip/irq-keystone.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c
index 8118ebe80b09..57819d1c3c32 100644
--- a/drivers/irqchip/irq-keystone.c
+++ b/drivers/irqchip/irq-keystone.c
@@ -135,6 +135,7 @@ static int keystone_irq_map(struct irq_domain *h, unsigned int virq,
static const struct irq_domain_ops keystone_irq_ops = {
.map = keystone_irq_map,
.xlate = irq_domain_xlate_onecell,
+ .remove = irq_domain_dispose_mappings,
};

static int keystone_irq_probe(struct platform_device *pdev)
@@ -203,13 +204,9 @@ static int keystone_irq_probe(struct platform_device *pdev)
static int keystone_irq_remove(struct platform_device *pdev)
{
struct keystone_irq_device *kirq = platform_get_drvdata(pdev);
- int hwirq;

free_irq(kirq->irq, kirq);

- for (hwirq = 0; hwirq < KEYSTONE_N_IRQ; hwirq++)
- irq_dispose_mapping(irq_find_mapping(kirq->irqd, hwirq));
-
irq_domain_remove(kirq->irqd);
return 0;
}
--
2.25.0
\
 
 \ /
  Last update: 2020-02-11 14:13    [W:0.044 / U:6.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site