Skip to content

Commit 8cb2dbf

Browse files
committed
irqdomain: Make build work for CONFIG_GENERIC_IRQ_CHIP=n
ld: kernel/irq/irqdomain.o: in function `irq_domain_instantiate': kernel/irq/irqdomain.c:296:(.text+0x10dd): undefined reference to `irq_domain_alloc_generic_chips' ld: kernel/irq/irqdomain.c:313:(.text+0x1218): undefined reference to `irq_domain_remove_generic_chips' ld: kernel/irq/irqdomain.o: in function `irq_domain_remove': kernel/irq/irqdomain.c:349:(.text+0x1ddf): undefined reference to `irq_domain_remove_generic_chips' Provide the required stubs. Fixes: e6f67ce ("irqdomain: Add support for generic irq chips creation before publishing a domain") Reported-by: Borislav Betkov <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 92584de commit 8cb2dbf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/linux/irq.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,9 +1182,19 @@ int devm_irq_setup_generic_chip(struct device *dev, struct irq_chip_generic *gc,
11821182

11831183
struct irq_chip_generic *irq_get_domain_generic_chip(struct irq_domain *d, unsigned int hw_irq);
11841184

1185+
#ifdef CONFIG_GENERIC_IRQ_CHIP
11851186
int irq_domain_alloc_generic_chips(struct irq_domain *d,
11861187
const struct irq_domain_chip_generic_info *info);
11871188
void irq_domain_remove_generic_chips(struct irq_domain *d);
1189+
#else
1190+
static inline int
1191+
irq_domain_alloc_generic_chips(struct irq_domain *d,
1192+
const struct irq_domain_chip_generic_info *info)
1193+
{
1194+
return -EINVAL;
1195+
}
1196+
static inline void irq_domain_remove_generic_chips(struct irq_domain *d) { }
1197+
#endif /* CONFIG_GENERIC_IRQ_CHIP */
11881198

11891199
int __irq_alloc_domain_generic_chips(struct irq_domain *d, int irqs_per_chip,
11901200
int num_ct, const char *name,

0 commit comments

Comments
 (0)