summaryrefslogtreecommitdiff
path: root/v4l/compat.h
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-03-03 13:53:13 -0800
committerTrent Piepho <xyzzy@speakeasy.org>2009-03-03 13:53:13 -0800
commit66457790914e610bc7f372d47794cee4304ba959 (patch)
tree2854a0bb18e778e87a02fabec7b3a46b973bbb35 /v4l/compat.h
parentaaac79924970a2c688fa7cf89dc75fc3822460bc (diff)
downloadmediapointer-dvb-s2-66457790914e610bc7f372d47794cee4304ba959.tar.gz
mediapointer-dvb-s2-66457790914e610bc7f372d47794cee4304ba959.tar.bz2
compat: rename struct delayed_work to work_struct on pre-2.6.20
From: Trent Piepho <xyzzy@speakeasy.org> In v2.6.19-rc6-118-g52bad64 struct work_struct was changed to be only for non-delayed work and struct delayed_work was created for delayed work. Instead of putting ifdefs in the drivers, we use compat.h to rename delayed_work to work_struct on pre-2.6.20 kernels. This will only be a problem if some driver decides to create identifiers named both work_struct and delayed_work in the same scope. There is one driver that has something named work_struct and none with anything named delayed_work, so I don't think will be a problem for as long as this compat code sticks around. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'v4l/compat.h')
-rw-r--r--v4l/compat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index b00e8eaf3..207cd3033 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -5,6 +5,14 @@
#ifndef _COMPAT_H
#define _COMPAT_H
+/* In v2.6.19-rc6-118-g52bad64 struct work_struct was was changed to be only for
+ * non-delayed work and struct delayed_work was created for delayed work. This
+ * will rename the structures. Hopefully no one will decide to name something
+ * delayed_work in the same context as something named work_struct. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
+#define delayed_work work_struct
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
#define KERN_CONT ""
#endif