From d66f2721df8cd96e54071cba813098f10587d020 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 31 May 2014 17:19:48 +0200 Subject: [PATCH] backports: add irq_get_trigger_type() This function is needed by some drivers. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/irq.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backport/backport-include/linux/irq.h diff --git a/backport/backport-include/linux/irq.h b/backport/backport-include/linux/irq.h new file mode 100644 index 000000000000..8b2804d6a73e --- /dev/null +++ b/backport/backport-include/linux/irq.h @@ -0,0 +1,13 @@ +#ifndef __BACKPORT_LINUX_IRQ_H +#define __BACKPORT_LINUX_IRQ_H +#include_next + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) +static inline u32 irq_get_trigger_type(unsigned int irq) +{ + struct irq_data *d = irq_get_irq_data(irq); + return d ? irqd_get_trigger_type(d) : 0; +} +#endif + +#endif /* __BACKPORT_LINUX_IRQ_H */ -- 2.30.2