#undef DEBUG
#define __NO_VERSION__
-#include "comedi_fops.h"
-#include "comedi_compat32.h"
-
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <asm/io.h>
#include <asm/uaccess.h>
+#include "comedi_fops.h"
+#include "comedi_compat32.h"
+
//#include "kvmem.h"
MODULE_AUTHOR("http://www.comedi.org");
module_param(comedi_debug, int, 0644);
#endif
-int comedi_autoconfig = 1;
+COMEDI_MODULE_PARAM_BOOL_T comedi_autoconfig = 1;
module_param(comedi_autoconfig, bool, 0444);
int comedi_num_legacy_minors = 0;
extern struct class *comedi_class;
extern const struct file_operations comedi_fops;
-extern int comedi_autoconfig;
+extern COMEDI_MODULE_PARAM_BOOL_T comedi_autoconfig;
#endif //_COMEDI_FOPS_H
#define _GNU_SOURCE
#define __NO_VERSION__
-#include "comedi_fops.h"
#include <linux/device.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <asm/io.h>
#include <asm/system.h>
+#include "comedi_fops.h"
+
static int postconfig(comedi_device * dev);
static int insn_rw_emulate_bits(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
MODULE_PARM(name, "1-" __MODULE_STRING(len) _MODULE_PARM_STRING_##type)
#endif /* module_param_array */
+/*
+ * Define a type for 'bool' parameters....
+ */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31))
+/* Need to use 'int' or 'unsigned int' for 'bool' module parameter. */
+typedef int COMEDI_MODULE_PARAM_BOOL_T;
+#else
+/* Can use 'int', 'unsigned int' or 'bool' for 'bool' module parameter, but
+ * only 'bool' will be allowed for kernel version 3.4 onwards. Using 'int'
+ * or 'unsigned int' results in a warning for kernel version 3.3. */
+typedef bool COMEDI_MODULE_PARAM_BOOL_T;
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) */
+
#endif /* _COMPAT_MODULEPARAM_H */