From: VMware, Inc <> Date: Fri, 12 Apr 2013 19:48:21 +0000 (-0700) Subject: VMCI: introduce compat_mod_param_bool X-Git-Tag: 2013.04.16-1098359~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=173a48f49ca383c2b5cd2c66bb17c7060e35c52c;p=thirdparty%2Fopen-vm-tools.git VMCI: introduce compat_mod_param_bool Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/modules/linux/shared/compat_module.h b/open-vm-tools/modules/linux/shared/compat_module.h index 66fc469f8..2af737223 100644 --- a/open-vm-tools/modules/linux/shared/compat_module.h +++ b/open-vm-tools/modules/linux/shared/compat_module.h @@ -69,4 +69,15 @@ static const char __module_cat(tag, __LINE__)[] \ #define MODULE_VERSION(_version) MODULE_INFO(version, _version) #endif +/* + * Linux kernel < 2.6.31 takes 'int' for 'bool' module parameters. + * Linux kernel >= 3.3.0 takes 'bool' for 'bool' module parameters. + * Kernels between the two take either. So flip switch at 3.0.0. + */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) + typedef bool compat_mod_param_bool; +#else + typedef int compat_mod_param_bool; +#endif + #endif /* __COMPAT_MODULE_H__ */ diff --git a/open-vm-tools/modules/linux/vmci/linux/driver.c b/open-vm-tools/modules/linux/vmci/linux/driver.c index 79128dc7a..82738e43f 100644 --- a/open-vm-tools/modules/linux/vmci/linux/driver.c +++ b/open-vm-tools/modules/linux/vmci/linux/driver.c @@ -150,22 +150,11 @@ static void process_bitmap(unsigned long data); # define VMCI_DISABLE_MSIX 1 #endif -/* - * Linux kernel < 2.6.31 takes 'int' for 'bool' module parameters. - * Linux kernel >= 3.3.0 takes 'bool' for 'bool' module parameters. - * Kernels between the two take either. So flip switch at 3.0.0. - */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) - typedef bool compat_bool; -#else - typedef int compat_bool; -#endif - static vmci_device vmci_dev; -static compat_bool vmci_disable_host = 0; -static compat_bool vmci_disable_guest = 0; -static compat_bool vmci_disable_msi; -static compat_bool vmci_disable_msix = VMCI_DISABLE_MSIX; +static compat_mod_param_bool vmci_disable_host = 0; +static compat_mod_param_bool vmci_disable_guest = 0; +static compat_mod_param_bool vmci_disable_msi; +static compat_mod_param_bool vmci_disable_msix = VMCI_DISABLE_MSIX; DECLARE_TASKLET(vmci_dg_tasklet, dispatch_datagrams, (unsigned long)&vmci_dev); diff --git a/open-vm-tools/modules/linux/vmci/linux/vmci_version.h b/open-vm-tools/modules/linux/vmci/linux/vmci_version.h index dd53ab8f4..1d189b79c 100644 --- a/open-vm-tools/modules/linux/vmci/linux/vmci_version.h +++ b/open-vm-tools/modules/linux/vmci/linux/vmci_version.h @@ -25,8 +25,8 @@ #ifndef _VMCI_VERSION_H_ #define _VMCI_VERSION_H_ -#define VMCI_DRIVER_VERSION 9.5.14.0 -#define VMCI_DRIVER_VERSION_COMMAS 9,5,14,0 -#define VMCI_DRIVER_VERSION_STRING "9.5.14.0" +#define VMCI_DRIVER_VERSION 9.5.15.0 +#define VMCI_DRIVER_VERSION_COMMAS 9,5,15,0 +#define VMCI_DRIVER_VERSION_STRING "9.5.15.0" #endif /* _VMCI_VERSION_H_ */