aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/wrapper.h
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2008-11-04 20:29:31 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:52:16 -0800
commited9eccbe8970f6eedc1b978c157caf1251a896d4 (patch)
tree07ac30d0a81af1f75f7ca40f32926d370d195107 /drivers/staging/comedi/wrapper.h
parent535deaa35e534f096843d930a3ba11e36c75f0d5 (diff)
Staging: add comedi core
This adds the Comedi core to the staging tree. This is a data acquision infrastructure for Linux, providing a common interface for these types of drivers. Taken directly from the comedi git tree, with only minor tweaks by Greg to get it to build properly within the kernel tree. From: David Schleef <ds@schleef.org> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/comedi/wrapper.h')
-rw-r--r--drivers/staging/comedi/wrapper.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/staging/comedi/wrapper.h b/drivers/staging/comedi/wrapper.h
new file mode 100644
index 00000000000..81f8adb768d
--- /dev/null
+++ b/drivers/staging/comedi/wrapper.h
@@ -0,0 +1,31 @@
+/*
+ linux/wrapper.h compatibility header
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __COMPAT_LINUX_WRAPPER_H_
+#define __COMPAT_LINUX_WRAPPER_H_
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#define mem_map_reserve(p) set_bit(PG_reserved, &((p)->flags))
+#define mem_map_unreserve(p) clear_bit(PG_reserved, &((p)->flags))
+#else
+#include_next <linux/wrapper.h>
+#endif
+
+#endif /* __COMPAT_LINUX_WRAPPER_H_ */