Wolfgang Grandegger wrote:
> Hello,
> yesterday I realized a problem with compat_module_param_array() with
> ksrc/drivers/can/sja1000/rtcan_mem.c under Linux 2.4. It uses
> CONFIG_XENO_DRIVERS_CAN_SJA1000_MEM_MAX_DEV to define the number of mem
> devices, which is set to '(4)' by "make [menuc]onfig". Unfortunately, 
> the brackets '()' break compat_module_param_array() because it treats 
> the count as string:
> #define compat_module_param_array(name, type, count, perm) \
>          static inline void *__check_existence_##name(void) { return
> &name; } \
>          MODULE_PARM(name, "1-" __MODULE_STRING(count)
> Any idea how to fix that? I actually tend to remove the configuration 
> option CONFIG_XENO_DRIVERS_CAN_SJA1000_MEM_MAX_DEV and hardcode it to 
> "4" (without brackets) in the driver. It's kind of overkill, anyhow.

I would say that this problem is not "with compat_module_param_array",
but about the Kconfig-based constant. I don't see a way to make the
module parameter array size configurable even under vanilla 2.4. Simply
go for a patchable constant in the source code like other drivers do.


Attachment: signature.asc
Description: OpenPGP digital signature

Xenomai-core mailing list

Reply via email to