From b3fbeef7cc83328f167ad4864bd81555a6c4d186 Mon Sep 17 00:00:00 2001 From: ppisa Date: Tue, 11 Jul 2006 00:27:49 +0000 Subject: [PATCH] Do not use new module parameters declaration for old 2.6.x kernels. There has been change in used count report in module_param_array_named macro somewhere around 2.6.10 kernel release which breaks LinCAN build -#define module_param_array_named(name, array, type, num, perm) \ +#define module_param_array_named(name, array, type, nump, perm) \ --- lincan/src/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lincan/src/main.c b/lincan/src/main.c index 2a55355..274d573 100644 --- a/lincan/src/main.c +++ b/lincan/src/main.c @@ -97,7 +97,7 @@ unsigned int irq_specified; unsigned int io_specified; unsigned int clockfreq_specified; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)) /* Module parameters, some must be supplied at module loading time */ MODULE_PARM(major,"1i"); /*MODULE_PARM(minor, "1-" __MODULE_STRING(MAX_TOT_CHIPS)"i");*/ @@ -114,7 +114,7 @@ MODULE_PARM(extmask, "1i"); MODULE_PARM(mo15mask, "1i"); MODULE_PARM(processlocal, "1i"); -#else /* LINUX_VERSION_CODE >= 2,6,0 */ +#else /* LINUX_VERSION_CODE >= 2,6,12 */ module_param(major, int, 0); module_param_array(minor, int, &minor_specified, 0); module_param(extended, int, 0); @@ -128,7 +128,7 @@ module_param(stdmask, int, 0); module_param(extmask, int, 0); module_param(mo15mask, int, 0); module_param(processlocal, int, 0); -#endif /* LINUX_VERSION_CODE >= 2,6,0 */ +#endif /* LINUX_VERSION_CODE >= 2,6,12 */ MODULE_PARM_DESC(major,"can be used to change default major [" __MODULE_STRING(CAN_MAJOR) "]"); MODULE_PARM_DESC(minor,"can be used to change default starting minor for each channel"); -- 2.39.2