From: Hauke Mehrtens Date: Sat, 31 May 2014 15:19:48 +0000 (+0200) Subject: backports: add irq_get_trigger_type() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d66f2721df8cd96e54071cba813098f10587d020;p=openwrt%2Fstaging%2Fblogic.git backports: add irq_get_trigger_type() This function is needed by some drivers. Signed-off-by: Hauke Mehrtens --- 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 */