summaryrefslogtreecommitdiff
path: root/include/linux/irqdomain.h
diff options
context:
space:
mode:
authorSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>2015-12-10 19:55:28 +0300
committerMarc Zyngier <marc.zyngier@arm.com>2015-12-21 16:49:49 +0300
commit75aba7b0e9ac416ca53c0c97680b8e9aedf09284 (patch)
treee7a35ae62453184a1ed1fd43f329ea3379e09563 /include/linux/irqdomain.h
parent471036b2b895789c2305428fd879006468e4a758 (diff)
downloadlinux-75aba7b0e9ac416ca53c0c97680b8e9aedf09284.tar.xz
irqdomain: Introduce is_fwnode_irqchip helper
Since there will be several places checking if fwnode.type is equal FWNODE_IRQCHIP, this patch adds a convenient function for this purpose. Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/linux/irqdomain.h')
-rw-r--r--include/linux/irqdomain.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index a06fedacd955..d72fabc04437 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -211,6 +211,11 @@ static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node)
return node ? &node->fwnode : NULL;
}
+static inline bool is_fwnode_irqchip(struct fwnode_handle *fwnode)
+{
+ return fwnode && fwnode->type == FWNODE_IRQCHIP;
+}
+
static inline struct irq_domain *irq_find_matching_host(struct device_node *node,
enum irq_domain_bus_token bus_token)
{