aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2013-06-08 07:57:40 -0400
committerGrant Likely <grant.likely@linaro.org>2013-06-10 06:52:09 -0400
commitfa40f377577752b83252b9d2b3165d4acee0eb7c (patch)
tree81314980dfd943e07cadd7415a6c092cf91e4b19 /include
parent1aa0dd94ca07df818cf14588c9031ab1d7fd84d3 (diff)
irqdomain: Clean up aftermath of irq_domain refactoring
After refactoring the irqdomain code, there are a number of API functions that are merely empty wrappers around core code. Drop those wrappers out of the C file and replace them with static inlines in the header. Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/irqdomain.h31
1 files changed, 24 insertions, 7 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 51ef84a3c990..fd4b26f8f44c 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -110,6 +110,10 @@ struct irq_domain {
110}; 110};
111 111
112#ifdef CONFIG_IRQ_DOMAIN 112#ifdef CONFIG_IRQ_DOMAIN
113struct irq_domain *__irq_domain_add(struct device_node *of_node,
114 int size, int direct_max,
115 const struct irq_domain_ops *ops,
116 void *host_data);
113struct irq_domain *irq_domain_add_simple(struct device_node *of_node, 117struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
114 unsigned int size, 118 unsigned int size,
115 unsigned int first_irq, 119 unsigned int first_irq,
@@ -121,17 +125,30 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
121 irq_hw_number_t first_hwirq, 125 irq_hw_number_t first_hwirq,
122 const struct irq_domain_ops *ops, 126 const struct irq_domain_ops *ops,
123 void *host_data); 127 void *host_data);
124struct irq_domain *irq_domain_add_linear(struct device_node *of_node, 128extern struct irq_domain *irq_find_host(struct device_node *node);
129extern void irq_set_default_host(struct irq_domain *host);
130
131/**
132 * irq_domain_add_linear() - Allocate and register a linear revmap irq_domain.
133 * @of_node: pointer to interrupt controller's device tree node.
134 * @size: Number of interrupts in the domain.
135 * @ops: map/unmap domain callbacks
136 * @host_data: Controller private data pointer
137 */
138static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
125 unsigned int size, 139 unsigned int size,
126 const struct irq_domain_ops *ops, 140 const struct irq_domain_ops *ops,
127 void *host_data); 141 void *host_data)
128struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, 142{
143 return __irq_domain_add(of_node, size, 0, ops, host_data);
144}
145static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
129 unsigned int max_irq, 146 unsigned int max_irq,
130 const struct irq_domain_ops *ops, 147 const struct irq_domain_ops *ops,
131 void *host_data); 148 void *host_data)
132extern struct irq_domain *irq_find_host(struct device_node *node); 149{
133extern void irq_set_default_host(struct irq_domain *host); 150 return __irq_domain_add(of_node, 0, max_irq, ops, host_data);
134 151}
135static inline struct irq_domain *irq_domain_add_legacy_isa( 152static inline struct irq_domain *irq_domain_add_legacy_isa(
136 struct device_node *of_node, 153 struct device_node *of_node,
137 const struct irq_domain_ops *ops, 154 const struct irq_domain_ops *ops,