From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755868AbcCTMoU (ORCPT ); Sun, 20 Mar 2016 08:44:20 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35090 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755401AbcCTMoL (ORCPT ); Sun, 20 Mar 2016 08:44:11 -0400 Message-ID: <1458477845.28679.1.camel@ingics.com> Subject: [PATCH] irqchip: tegra: Switch to use irq_domain_free_irqs_common From: Axel Lin To: Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Stephen Warren , Thierry Reding , Alexandre Courbot , linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Date: Sun, 20 Mar 2016 20:44:05 +0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Current code calls irq_domain_alloc_irqs_parent() in .alloc, so it should call irq_domain_free_irqs_parent() accordingly in .free. Fix it by switching to use irq_domain_free_irqs_common() instead of open-coded. Signed-off-by: Axel Lin --- drivers/irqchip/irq-tegra.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/irqchip/irq-tegra.c b/drivers/irqchip/irq-tegra.c index 121ec30..50be963 100644 --- a/drivers/irqchip/irq-tegra.c +++ b/drivers/irqchip/irq-tegra.c @@ -275,22 +275,10 @@ static int tegra_ictlr_domain_alloc(struct irq_domain *domain, &parent_fwspec); } -static void tegra_ictlr_domain_free(struct irq_domain *domain, - unsigned int virq, - unsigned int nr_irqs) -{ - unsigned int i; - - for (i = 0; i < nr_irqs; i++) { - struct irq_data *d = irq_domain_get_irq_data(domain, virq + i); - irq_domain_reset_irq_data(d); - } -} - static const struct irq_domain_ops tegra_ictlr_domain_ops = { .translate = tegra_ictlr_domain_translate, .alloc = tegra_ictlr_domain_alloc, - .free = tegra_ictlr_domain_free, + .free = irq_domain_free_irqs_common, }; static int __init tegra_ictlr_init(struct device_node *node, -- 2.1.4