Skip to contentSkip to conversation

backports: irq_get_trigger_type requires CONFIG_HAVE_GENERIC_HARDIRQS=y

PATCH In review Stefan Assmann 2 participants 2 messages Aug 8, 2014 – Aug 9, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backports: irq_get_trigger_type requires CONFIG_HAVE_GENERIC_HARDIRQS=y

Only backport irq_get_trigger_type on architectures that have CONFIG_HAVE_GENERIC_HARDIRQS=y. Otherwise we end up with:

In file included from drivers/pci/msi.c:11:0:
backport/backport-include/linux/irq.h: In function 'irq_get_trigger_type':
backport/backport-include/linux/irq.h:9:9: error: implicit declaration of function 'irq_get_irq_data' [-Werror=implicit-function-declaration]
struct irq_data *d = irq_get_irq_data(irq);

---
 backport/backport-include/linux/irq.h | 2 ++
 1 file changed, 2 insertions(+)
backport/backport-include/linux/irq.h +2 -0
index 1738e9b..29b543b 100644
@@ -2,6 +2,7 @@
 #define __BACKPORT_LINUX_IRQ_H
 #include_next <linux/irq.h>
 
+#ifdef CONFIG_HAVE_GENERIC_HARDIRQS
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
 #define irq_get_trigger_type LINUX_BACKPORT(irq_get_trigger_type)
 static inline u32 irq_get_trigger_type(unsigned int irq)
@@ -10,5 +11,6 @@ static inline u32 irq_get_trigger_type(unsigned int irq)
 	return d ? irqd_get_trigger_type(d) : 0;
 }
 #endif
+#endif /* CONFIG_HAVE_GENERIC_HARDIRQS */
 
 #endif /* __BACKPORT_LINUX_IRQ_H */
Signature · 1 line
1.9.3
#1 lore raw
Quoted 9 lines · Stefan Assmann

Only backport irq_get_trigger_type on architectures that have CONFIG_HAVE_GENERIC_HARDIRQS=y. Otherwise we end up with:

In file included from drivers/pci/msi.c:11:0:
backport/backport-include/linux/irq.h: In function 'irq_get_trigger_type':
backport/backport-include/linux/irq.h:9:9: error: implicit declaration of function 'irq_get_irq_data' [-Werror=implicit-function-declaration]
struct irq_data *d = irq_get_irq_data(irq);

Quoted 4 lines
---
 backport/backport-include/linux/irq.h | 2 ++
 1 file changed, 2 insertions(+)

Thank you for the patch, it was applied and pushed out.

Hauke