--- /dev/null
+#ifndef __BACKPORT_LINUX_WAIT_H
+#define __BACKPORT_LINUX_WAIT_H
+#include_next <linux/wait.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
+extern int bit_wait(void *);
+extern int bit_wait_io(void *);
+
+static inline int
+backport_wait_on_bit(void *word, int bit, unsigned mode)
+{
+ return wait_on_bit(word, bit, bit_wait, mode);
+}
+
+static inline int
+backport_wait_on_bit_io(void *word, int bit, unsigned mode)
+{
+ return wait_on_bit(word, bit, bit_wait_io, mode);
+}
+
+#define wait_on_bit LINUX_BACKPORT(wait_on_bit)
+#define wait_on_bit_io LINUX_BACKPORT(wait_on_bit_io)
+
+#endif
+
+#endif /* __BACKPORT_LINUX_WAIT_H */
compat-$(CPTCFG_BACKPORT_KERNEL_3_13) += backport-3.13.o
compat-$(CPTCFG_BACKPORT_KERNEL_3_14) += backport-3.14.o
compat-$(CPTCFG_BACKPORT_KERNEL_3_15) += backport-3.15.o
+compat-$(CPTCFG_BACKPORT_KERNEL_3_17) += backport-3.17.o
compat-$(CPTCFG_BACKPORT_BUILD_CRYPTO_CCM) += crypto-ccm.o
compat-$(CPTCFG_BACKPORT_BUILD_DMA_SHARED_HELPERS) += dma-shared-helpers.o
--- /dev/null
+/*
+ * Copyright (c) 2014 Hauke Mehrtens <hauke@hauke-m.de>
+ *
+ * Backport functionality introduced in Linux 3.17.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/wait.h>
+#include <linux/sched.h>
+#include <linux/export.h>
+
+int bit_wait(void *word)
+{
+ schedule();
+ return 0;
+}
+EXPORT_SYMBOL_GPL(bit_wait);
+
+int bit_wait_io(void *word)
+{
+ io_schedule();
+ return 0;
+}
+EXPORT_SYMBOL_GPL(bit_wait_io);
+