aboutsummaryrefslogtreecommitdiffstats
path: root/include/compat/linux/compat-3.3.h
diff options
context:
space:
mode:
authorcodeworkx <daniel.hillenbrand@codeworkx.de>2012-06-02 13:09:29 +0200
committercodeworkx <daniel.hillenbrand@codeworkx.de>2012-06-02 13:09:29 +0200
commitc6da2cfeb05178a11c6d062a06f8078150ee492f (patch)
treef3b4021d252c52d6463a9b3c1bb7245e399b009c /include/compat/linux/compat-3.3.h
parentc6d7c4dbff353eac7919342ae6b3299a378160a6 (diff)
downloadkernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.zip
kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.gz
kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.bz2
samsung update 1
Diffstat (limited to 'include/compat/linux/compat-3.3.h')
-rwxr-xr-xinclude/compat/linux/compat-3.3.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/include/compat/linux/compat-3.3.h b/include/compat/linux/compat-3.3.h
new file mode 100755
index 0000000..4965f23
--- /dev/null
+++ b/include/compat/linux/compat-3.3.h
@@ -0,0 +1,56 @@
+#ifndef LINUX_3_3_COMPAT_H
+#define LINUX_3_3_COMPAT_H
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+
+/* include to override NL80211_FEATURE_SK_TX_STATUS */
+#include <linux/nl80211.h>
+
+static inline void skb_complete_wifi_ack(struct sk_buff *skb, bool acked)
+{
+ WARN_ON(1);
+}
+#define NL80211_FEATURE_SK_TX_STATUS 0
+
+typedef u32 netdev_features_t;
+
+/* source include/linux/device.h */
+/**
+ * module_driver() - Helper macro for drivers that don't do anything
+ * special in module init/exit. This eliminates a lot of boilerplate.
+ * Each module may only use this macro once, and calling it replaces
+ * module_init() and module_exit().
+ *
+ * Use this macro to construct bus specific macros for registering
+ * drivers, and do not use it on its own.
+ */
+#define module_driver(__driver, __register, __unregister) \
+static int __init __driver##_init(void) \
+{ \
+ return __register(&(__driver)); \
+} \
+module_init(__driver##_init); \
+static void __exit __driver##_exit(void) \
+{ \
+ __unregister(&(__driver)); \
+} \
+module_exit(__driver##_exit);
+
+/* source include/linux/usb.h */
+/**
+ * module_usb_driver() - Helper macro for registering a USB driver
+ * @__usb_driver: usb_driver struct
+ *
+ * Helper macro for USB drivers which do not do anything special in module
+ * init/exit. This eliminates a lot of boilerplate. Each module may only
+ * use this macro once, and calling it replaces module_init() and module_exit()
+ */
+#define module_usb_driver(__usb_driver) \
+ module_driver(__usb_driver, usb_register, \
+ usb_deregister)
+
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) */
+
+#endif /* LINUX_3_3_COMPAT_H */