From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753288AbbJMRzz (ORCPT ); Tue, 13 Oct 2015 13:55:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:42979 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753043AbbJMRzw (ORCPT ); Tue, 13 Oct 2015 13:55:52 -0400 Date: Tue, 13 Oct 2015 10:55:02 -0700 From: tip-bot for Marc Zyngier Message-ID: Cc: linux-kernel@vger.kernel.org, Suravee.Suthikulpanit@amd.com, lorenzo.pieralisi@arm.com, tomasz.nowicki@linaro.org, hanjun.guo@linaro.org, marc.zyngier@arm.com, graeme@xora.org.uk, mingo@kernel.org, jiang.liu@linux.intel.com, jason@lakedaemon.net, jakeo@microsoft.com, hpa@zytor.com, linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, rjw@rjwysocki.net Reply-To: Suravee.Suthikulpanit@amd.com, linux-kernel@vger.kernel.org, hanjun.guo@linaro.org, tomasz.nowicki@linaro.org, lorenzo.pieralisi@arm.com, jakeo@microsoft.com, jiang.liu@linux.intel.com, jason@lakedaemon.net, mingo@kernel.org, graeme@xora.org.uk, marc.zyngier@arm.com, rjw@rjwysocki.net, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, hpa@zytor.com In-Reply-To: <1444737105-31573-3-git-send-email-marc.zyngier@arm.com> References: <1444737105-31573-3-git-send-email-marc.zyngier@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] irqdomain: Convert irqdomain-%3Eof_node to fwnode Git-Commit-ID: f110711a6053f08731858aa91420104094188973 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: f110711a6053f08731858aa91420104094188973 Gitweb: http://git.kernel.org/tip/f110711a6053f08731858aa91420104094188973 Author: Marc Zyngier AuthorDate: Tue, 13 Oct 2015 12:51:30 +0100 Committer: Thomas Gleixner CommitDate: Tue, 13 Oct 2015 19:01:23 +0200 irqdomain: Convert irqdomain-%3Eof_node to fwnode Now that we have everyone accessing the of_node field via the irq_domain_get_of_node accessor, it is pretty easy to swap it for a pointer to a fwnode_handle. This translates into a few limited changes in __irq_domain_add, and an updated irq_domain_get_of_node. Signed-off-by: Marc Zyngier Reviewed-and-tested-by: Hanjun Guo Tested-by: Lorenzo Pieralisi Cc: Cc: Tomasz Nowicki Cc: Suravee Suthikulpanit Cc: Graeme Gregory Cc: Jake Oshins Cc: Jiang Liu Cc: Jason Cooper Cc: Rafael J. Wysocki Link: http://lkml.kernel.org/r/1444737105-31573-3-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner --- include/linux/irqdomain.h | 5 +++-- kernel/irq/irqdomain.c | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index f644fdb..2f508f4 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -34,6 +34,7 @@ #include #include +#include #include struct device_node; @@ -130,7 +131,7 @@ struct irq_domain { unsigned int flags; /* Optional data */ - struct device_node *of_node; + struct fwnode_handle *fwnode; enum irq_domain_bus_token bus_token; struct irq_domain_chip_generic *gc; #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY @@ -163,7 +164,7 @@ enum { static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d) { - return d->of_node; + return to_of_node(d->fwnode); } #ifdef CONFIG_IRQ_DOMAIN diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 8f8b538..1aee5c1 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -46,17 +46,21 @@ struct irq_domain *__irq_domain_add(struct device_node *of_node, int size, void *host_data) { struct irq_domain *domain; + struct fwnode_handle *fwnode; domain = kzalloc_node(sizeof(*domain) + (sizeof(unsigned int) * size), GFP_KERNEL, of_node_to_nid(of_node)); if (WARN_ON(!domain)) return NULL; + of_node_get(of_node); + fwnode = of_node ? &of_node->fwnode : NULL; + /* Fill structure */ INIT_RADIX_TREE(&domain->revmap_tree, GFP_KERNEL); domain->ops = ops; domain->host_data = host_data; - domain->of_node = of_node_get(of_node); + domain->fwnode = fwnode; domain->hwirq_max = hwirq_max; domain->revmap_size = size; domain->revmap_direct_max_irq = direct_max;