Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 9 | f9daq | 1 | #ifndef __COMMON_H__ |
| 2 | #define __COMMON_H__ |
||
| 3 | |||
| 4 | //**************************************************************************** |
||
| 5 | // Copyright (C) 2000-2004 ARW Elektronik Germany |
||
| 6 | // |
||
| 7 | // |
||
| 8 | // This program is free software; you can redistribute it and/or modify |
||
| 9 | // it under the terms of the GNU General Public License as published by |
||
| 10 | // the Free Software Foundation; either version 2 of the License, or |
||
| 11 | // (at your option) any later version. |
||
| 12 | // |
||
| 13 | // This program is distributed in the hope that it will be useful, |
||
| 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 16 | // GNU General Public License for more details. |
||
| 17 | // |
||
| 18 | // You should have received a copy of the GNU General Public License |
||
| 19 | // along with this program; if not, write to the Free Software |
||
| 20 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
||
| 21 | // |
||
| 22 | // This product is not authorized for use as critical component in |
||
| 23 | // life support systems without the express written approval of |
||
| 24 | // ARW Elektronik Germany. |
||
| 25 | // |
||
| 26 | // Please announce changes and hints to ARW Elektronik |
||
| 27 | // |
||
| 28 | // Maintainer(s): Klaus Hitschler (klaus.hitschler@gmx.de) |
||
| 29 | // |
||
| 30 | //**************************************************************************** |
||
| 31 | |||
| 32 | //**************************************************************************** |
||
| 33 | // |
||
| 34 | // common.h - common definitions to include in all *.c files |
||
| 35 | // |
||
| 36 | // $Log: common.h,v $ |
||
| 37 | // Revision 1.6 2004/08/13 19:23:26 klaus |
||
| 38 | // conversion to kernel-version 2.6, released version 3.0 |
||
| 39 | // |
||
| 40 | // Revision 1.5 2002/10/18 21:56:28 klaus |
||
| 41 | // completed functional features, untested |
||
| 42 | // |
||
| 43 | // Revision 1.3 2002/10/10 18:57:46 klaus |
||
| 44 | // source beautyfied |
||
| 45 | // |
||
| 46 | //**************************************************************************** |
||
| 47 | |||
| 48 | #include <generated/autoconf.h> |
||
| 49 | #if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS) |
||
| 50 | #define MODVERSIONS |
||
| 51 | #endif |
||
| 52 | |||
| 53 | #include <linux/version.h> |
||
| 54 | |||
| 55 | #ifdef MODVERSIONS |
||
| 56 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) |
||
| 57 | #include <config/modversions.h> |
||
| 58 | #else |
||
| 59 | #include <linux/modversions.h> |
||
| 60 | #endif |
||
| 61 | #endif |
||
| 62 | |||
| 63 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0) |
||
| 64 | #define kfree_s(ptr, size) kfree(ptr) /* a workaround cause kfree_s is disapeared in V 2.4 */ |
||
| 65 | #endif |
||
| 66 | |||
| 67 | // circumvent deprecated MOD_..._USE_COUNT |
||
| 68 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) |
||
| 69 | #define __MOD_INC_USE_COUNT__ |
||
| 70 | #define __MOD_DEC_USE_COUNT__ |
||
| 71 | #else |
||
| 72 | #define __MOD_INC_USE_COUNT__ MOD_INC_USE_COUNT |
||
| 73 | #define __MOD_DEC_USE_COUNT__ MOD_DEC_USE_COUNT |
||
| 74 | #endif |
||
| 75 | |||
| 76 | // switch to disable all printks for not debugging |
||
| 77 | #ifdef __DEBUG__ |
||
| 78 | #define PRINTK printk |
||
| 79 | #else |
||
| 80 | #define PRINTK(stuff...) |
||
| 81 | #endif |
||
| 82 | |||
| 83 | #endif /* __COMMON_H__ */ |