/* Since we request GPIOs from ourself */
#include <linux/pinctrl/consumer.h>
#include <linux/spinlock.h>
-#include <linux/version.h>
#include "core.h"
.irq_set_type = gpio_irq_type,
};
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
-static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
-#else
static void gpio_irq_handler(struct irq_desc *desc)
-#endif
{
struct irq_chip *chip = irq_desc_get_chip(desc);
struct irq_data *idata = irq_desc_get_irq_data(desc);
irq_set_lockdep_class(virq, &gpio_lock_class);
irq_set_chip_and_handler(virq, &gpio_irqchip, handle_edge_irq);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- set_irq_flags(virq, IRQF_VALID);
-#endif
irq_set_chip_data(virq, oxnas_gpio);
return 0;