Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 7235/1: irqdomain: export irq_domain_simple_ops for !CONFIG_OF

irqdomain support is used in interrupt controller drivers that may not
have device tree support but only need the basic HW->Linux irq
translation. Rather than having each of these implement their own IRQ
domain, allow them to use the simple ops.

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Rob Herring <robherring2@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Jamie Iles and committed by
Russell King
c87fb573 df0bcfe0

+9 -6
+2 -1
include/linux/irqdomain.h
··· 91 91 92 92 extern void irq_domain_add(struct irq_domain *domain); 93 93 extern void irq_domain_del(struct irq_domain *domain); 94 + 95 + extern struct irq_domain_ops irq_domain_simple_ops; 94 96 #endif /* CONFIG_IRQ_DOMAIN */ 95 97 96 98 #if defined(CONFIG_IRQ_DOMAIN) && defined(CONFIG_OF_IRQ) 97 - extern struct irq_domain_ops irq_domain_simple_ops; 98 99 extern void irq_domain_add_simple(struct device_node *controller, int irq_base); 99 100 extern void irq_domain_generate_simple(const struct of_device_id *match, 100 101 u64 phys_base, unsigned int irq_start);
+7 -5
kernel/irq/irqdomain.c
··· 143 143 return 0; 144 144 } 145 145 146 - struct irq_domain_ops irq_domain_simple_ops = { 147 - .dt_translate = irq_domain_simple_dt_translate, 148 - }; 149 - EXPORT_SYMBOL_GPL(irq_domain_simple_ops); 150 - 151 146 /** 152 147 * irq_domain_create_simple() - Set up a 'simple' translation range 153 148 */ ··· 177 182 } 178 183 EXPORT_SYMBOL_GPL(irq_domain_generate_simple); 179 184 #endif /* CONFIG_OF_IRQ */ 185 + 186 + struct irq_domain_ops irq_domain_simple_ops = { 187 + #ifdef CONFIG_OF_IRQ 188 + .dt_translate = irq_domain_simple_dt_translate, 189 + #endif /* CONFIG_OF_IRQ */ 190 + }; 191 + EXPORT_SYMBOL_GPL(irq_domain_simple_ops);