David Schleef | ed9eccb | 2008-11-04 20:29:31 -0800 | [diff] [blame] | 1 | /* |
| 2 | comedi/comedi_compat32.h |
| 3 | 32-bit ioctl compatibility for 64-bit comedi kernel module. |
| 4 | |
| 5 | Author: Ian Abbott, MEV Ltd. <abbotti@mev.co.uk> |
| 6 | Copyright (C) 2007 MEV Ltd. <http://www.mev.co.uk/> |
| 7 | |
| 8 | COMEDI - Linux Control and Measurement Device Interface |
| 9 | Copyright (C) 1997-2007 David A. Schleef <ds@schleef.org> |
| 10 | |
| 11 | This program is free software; you can redistribute it and/or modify |
| 12 | it under the terms of the GNU General Public License as published by |
| 13 | the Free Software Foundation; either version 2 of the License, or |
| 14 | (at your option) any later version. |
| 15 | |
| 16 | This program is distributed in the hope that it will be useful, |
| 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | GNU General Public License for more details. |
| 20 | |
| 21 | You should have received a copy of the GNU General Public License |
| 22 | along with this program; if not, write to the Free Software |
| 23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 24 | |
| 25 | */ |
| 26 | |
| 27 | #ifndef _COMEDI_COMPAT32_H |
| 28 | #define _COMEDI_COMPAT32_H |
| 29 | |
| 30 | #include <linux/compat.h> |
| 31 | #include <linux/fs.h> /* For HAVE_COMPAT_IOCTL and HAVE_UNLOCKED_IOCTL */ |
| 32 | |
| 33 | #ifdef CONFIG_COMPAT |
| 34 | |
| 35 | #ifdef HAVE_COMPAT_IOCTL |
| 36 | |
| 37 | extern long comedi_compat_ioctl(struct file *file, unsigned int cmd, |
| 38 | unsigned long arg); |
Greg Kroah-Hartman | e0dcef7 | 2008-11-13 16:36:22 -0800 | [diff] [blame] | 39 | #define comedi_register_ioctl32() do {} while (0) |
| 40 | #define comedi_unregister_ioctl32() do {} while (0) |
David Schleef | ed9eccb | 2008-11-04 20:29:31 -0800 | [diff] [blame] | 41 | |
| 42 | #else /* HAVE_COMPAT_IOCTL */ |
| 43 | |
| 44 | #define comedi_compat_ioctl 0 /* NULL */ |
| 45 | extern void comedi_register_ioctl32(void); |
| 46 | extern void comedi_unregister_ioctl32(void); |
| 47 | |
| 48 | #endif /* HAVE_COMPAT_IOCTL */ |
| 49 | |
| 50 | #else /* CONFIG_COMPAT */ |
| 51 | |
| 52 | #define comedi_compat_ioctl 0 /* NULL */ |
Greg Kroah-Hartman | e0dcef7 | 2008-11-13 16:36:22 -0800 | [diff] [blame] | 53 | #define comedi_register_ioctl32() do {} while (0) |
| 54 | #define comedi_unregister_ioctl32() do {} while (0) |
David Schleef | ed9eccb | 2008-11-04 20:29:31 -0800 | [diff] [blame] | 55 | |
| 56 | #endif /* CONFIG_COMPAT */ |
| 57 | |
| 58 | #endif /* _COMEDI_COMPAT32_H */ |