diff options
Diffstat (limited to 'kernel/irq/irqdomain.c')
-rw-r--r-- | kernel/irq/irqdomain.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 4752b43662e0..8c0a0ae43521 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c | |||
@@ -80,7 +80,7 @@ EXPORT_SYMBOL_GPL(irq_domain_free_fwnode); | |||
80 | 80 | ||
81 | /** | 81 | /** |
82 | * __irq_domain_add() - Allocate a new irq_domain data structure | 82 | * __irq_domain_add() - Allocate a new irq_domain data structure |
83 | * @of_node: optional device-tree node of the interrupt controller | 83 | * @fwnode: firmware node for the interrupt controller |
84 | * @size: Size of linear map; 0 for radix mapping only | 84 | * @size: Size of linear map; 0 for radix mapping only |
85 | * @hwirq_max: Maximum number of interrupts supported by controller | 85 | * @hwirq_max: Maximum number of interrupts supported by controller |
86 | * @direct_max: Maximum value of direct maps; Use ~0 for no limit; 0 for no | 86 | * @direct_max: Maximum value of direct maps; Use ~0 for no limit; 0 for no |
@@ -96,10 +96,8 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, | |||
96 | const struct irq_domain_ops *ops, | 96 | const struct irq_domain_ops *ops, |
97 | void *host_data) | 97 | void *host_data) |
98 | { | 98 | { |
99 | struct device_node *of_node = to_of_node(fwnode); | ||
99 | struct irq_domain *domain; | 100 | struct irq_domain *domain; |
100 | struct device_node *of_node; | ||
101 | |||
102 | of_node = to_of_node(fwnode); | ||
103 | 101 | ||
104 | domain = kzalloc_node(sizeof(*domain) + (sizeof(unsigned int) * size), | 102 | domain = kzalloc_node(sizeof(*domain) + (sizeof(unsigned int) * size), |
105 | GFP_KERNEL, of_node_to_nid(of_node)); | 103 | GFP_KERNEL, of_node_to_nid(of_node)); |
@@ -868,7 +866,10 @@ int irq_domain_xlate_onetwocell(struct irq_domain *d, | |||
868 | if (WARN_ON(intsize < 1)) | 866 | if (WARN_ON(intsize < 1)) |
869 | return -EINVAL; | 867 | return -EINVAL; |
870 | *out_hwirq = intspec[0]; | 868 | *out_hwirq = intspec[0]; |
871 | *out_type = (intsize > 1) ? intspec[1] : IRQ_TYPE_NONE; | 869 | if (intsize > 1) |
870 | *out_type = intspec[1] & IRQ_TYPE_SENSE_MASK; | ||
871 | else | ||
872 | *out_type = IRQ_TYPE_NONE; | ||
872 | return 0; | 873 | return 0; |
873 | } | 874 | } |
874 | EXPORT_SYMBOL_GPL(irq_domain_xlate_onetwocell); | 875 | EXPORT_SYMBOL_GPL(irq_domain_xlate_onetwocell); |