summaryrefslogtreecommitdiff
path: root/backport-include/linux/moduleparam.h
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2017-11-21 12:59:41 +0000
committerDominik Sliwa <dominik.sliwa@toradex.com>2017-12-22 09:40:23 +0000
commite34cb44ac7c08783b98a16eec70125e205e6eb12 (patch)
tree1101d23f1a73e5627ae187b07c7a0cf8826e10d1 /backport-include/linux/moduleparam.h
initial commit
Generated againts 4.14 kernel source with git backports 1d8cc151d365582b42be00af776270b834a7a37d
Diffstat (limited to 'backport-include/linux/moduleparam.h')
-rw-r--r--backport-include/linux/moduleparam.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/backport-include/linux/moduleparam.h b/backport-include/linux/moduleparam.h
new file mode 100644
index 0000000..914baad
--- /dev/null
+++ b/backport-include/linux/moduleparam.h
@@ -0,0 +1,44 @@
+#ifndef __BACKPORT_LINUX_MODULEPARAM_H
+#define __BACKPORT_LINUX_MODULEPARAM_H
+#include_next <linux/moduleparam.h>
+
+#if LINUX_VERSION_IS_LESS(4,2,0)
+#define kernel_param_lock LINUX_BACKPORT(kernel_param_lock)
+static inline void kernel_param_lock(struct module *mod)
+{
+ __kernel_param_lock();
+}
+#define kernel_param_unlock LINUX_BACKPORT(kernel_param_unlock)
+static inline void kernel_param_unlock(struct module *mod)
+{
+ __kernel_param_unlock();
+}
+#endif
+
+#if LINUX_VERSION_IS_LESS(3,8,0)
+#undef __MODULE_INFO
+#ifdef MODULE
+#define __MODULE_INFO(tag, name, info) \
+static const char __UNIQUE_ID(name)[] \
+ __used __attribute__((section(".modinfo"), unused, aligned(1))) \
+ = __stringify(tag) "=" info
+#else /* !MODULE */
+/* This struct is here for syntactic coherency, it is not used */
+#define __MODULE_INFO(tag, name, info) \
+ struct __UNIQUE_ID(name) {}
+#endif
+#endif /* < 3.8 */
+
+#if LINUX_VERSION_IS_LESS(3,17,0)
+extern struct kernel_param_ops param_ops_ullong;
+extern int param_set_ullong(const char *val, const struct kernel_param *kp);
+extern int param_get_ullong(char *buffer, const struct kernel_param *kp);
+#define param_check_ullong(name, p) __param_check(name, p, unsigned long long)
+#endif
+
+#ifndef module_param_hw_array
+#define module_param_hw_array(name, type, hwtype, nump, perm) \
+ module_param_array(name, type, nump, perm)
+#endif
+
+#endif /* __BACKPORT_LINUX_MODULEPARAM_H */