Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753303AbaKLNqM (ORCPT ); Wed, 12 Nov 2014 08:46:12 -0500 Received: from www.linutronix.de ([62.245.132.108]:41654 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752923AbaKLNnC (ORCPT ); Wed, 12 Nov 2014 08:43:02 -0500 Message-Id: <20141112134120.393705922@linutronix.de> User-Agent: quilt/0.63-1 Date: Wed, 12 Nov 2014 13:43:02 -0000 From: Thomas Gleixner To: LKML Cc: Jiang Liu , Bjorn Helgaas , Grant Likely , Marc Zyngier , Yingjoe Chen , Yijing Wang Subject: [patch 07/16] genirq: Introduce helper irq_domain_set_info() to reduce duplicated code References: <20141112133941.647950773@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=rfc-part4-v1-02-17-genirq-introduce-helper-irq_domain_set_info-to-reduce-duplicated-code.patch X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiang Liu Signed-off-by: Jiang Liu Cc: Bjorn Helgaas Cc: Grant Likely Cc: Marc Zyngier Cc: Yingjoe Chen Cc: Yijing Wang Signed-off-by: Thomas Gleixner --- include/linux/irqdomain.h | 5 +++++ kernel/irq/irqdomain.c | 10 ++++++++++ 2 files changed, 15 insertions(+) Index: tip/include/linux/irqdomain.h =================================================================== --- tip.orig/include/linux/irqdomain.h +++ tip/include/linux/irqdomain.h @@ -33,6 +33,7 @@ #define _LINUX_IRQDOMAIN_H #include +#include #include struct device_node; @@ -263,6 +264,10 @@ extern int irq_domain_set_hwirq_and_chip irq_hw_number_t hwirq, struct irq_chip *chip, void *chip_data); +extern void irq_domain_set_info(struct irq_domain *domain, unsigned int virq, + irq_hw_number_t hwirq, struct irq_chip *chip, + void *chip_data, irq_flow_handler_t handler, + void *handler_data, const char *handler_name); extern void irq_domain_reset_irq_data(struct irq_data *irq_data); extern void irq_domain_free_irqs_common(struct irq_domain *domain, int virq, int nr_irqs); Index: tip/kernel/irq/irqdomain.c =================================================================== --- tip.orig/kernel/irq/irqdomain.c +++ tip/kernel/irq/irqdomain.c @@ -882,6 +882,16 @@ int irq_domain_set_hwirq_and_chip(struct return 0; } +void irq_domain_set_info(struct irq_domain *domain, unsigned int virq, + irq_hw_number_t hwirq, struct irq_chip *chip, + void *chip_data, irq_flow_handler_t handler, + void *handler_data, const char *handler_name) +{ + irq_domain_set_hwirq_and_chip(domain, virq, hwirq, chip, chip_data); + __irq_set_handler(virq, handler, 0, handler_name); + irq_set_handler_data(virq, handler_data); +} + void irq_domain_reset_irq_data(struct irq_data *irq_data) { irq_data->hwirq = 0; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/