Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[pandora-kernel.git] / drivers / staging / dgnc / dgnc_kcompat.h
1 /*
2  * Copyright 2004 Digi International (www.digi.com)
3  *      Scott H Kilau <Scott_Kilau at digi dot com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2, or (at your option)
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
12  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  * PURPOSE.  See the GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *
19  *      NOTE: THIS IS A SHARED HEADER. DO NOT CHANGE CODING STYLE!!!
20  *
21  *************************************************************************
22  *
23  * This file is intended to contain all the kernel "differences" between the
24  * various kernels that we support.
25  *
26  *************************************************************************/
27
28 #ifndef __DGNC_KCOMPAT_H
29 #define __DGNC_KCOMPAT_H
30
31 #if !defined(TTY_FLIPBUF_SIZE)
32 # define TTY_FLIPBUF_SIZE 512
33 #endif
34
35
36 /* Sparse stuff */
37 # ifndef __user
38 #  define __user
39 #  define __kernel
40 #  define __safe
41 #  define __force
42 #  define __chk_user_ptr(x) (void)0
43 # endif
44
45
46 #  define PARM_STR(VAR, INIT, PERM, DESC) \
47                 static char *VAR = INIT; \
48                 char *dgnc_##VAR; \
49                 module_param(VAR, charp, PERM); \
50                 MODULE_PARM_DESC(VAR, DESC);
51
52 #  define PARM_INT(VAR, INIT, PERM, DESC) \
53                 static int VAR = INIT; \
54                 int dgnc_##VAR; \
55                 module_param(VAR, int, PERM); \
56                 MODULE_PARM_DESC(VAR, DESC);
57
58 #  define PARM_ULONG(VAR, INIT, PERM, DESC) \
59                 static ulong VAR = INIT; \
60                 ulong dgnc_##VAR; \
61                 module_param(VAR, long, PERM); \
62                 MODULE_PARM_DESC(VAR, DESC);
63
64 #endif /* ! __DGNC_KCOMPAT_H */