lantiq: fix lantiq applications kernel 4.14 compatiblity
[openwrt/staging/wigyori.git] / package / kernel / lantiq / ltq-deu / src / ifxmips_deu_dma.h
index fde7a900bb4c56272f3e2ea623509c6475f8f440..b64d74776bb4f602d17e4848285e99500a8a797b 100644 (file)
@@ -39,6 +39,7 @@
 #include <asm/byteorder.h>
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
+#include <linux/version.h>
 
 // must match the size of memory block allocated for g_dma_block and g_dma_block2
 #define DEU_MAX_PACKET_SIZE    (PAGE_SIZE >> 1)
@@ -53,7 +54,11 @@ typedef struct ifx_deu_device {
        int recv_count;
        int packet_size;
        int packet_num;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
+       wait_queue_entry_t wait;
+#else
        wait_queue_t wait;
+#endif
 } _ifx_deu_device;
 
 extern _ifx_deu_device ifx_deu[1];