module_param_array()ubuntu 11.04(kernel 2.6.38)问题
|
嗨,我在为
Linux
构建uLan
驱动程序时遇到问题。
编译时出现错误:
/home/tomas/hairc/ulan-build/host/ul_drv/ul_drv/ul_linux.c:73:1: error: ‘param_ops_char’ undeclared here (not in a function)
/home/tomas/hairc/ulan-build/host/ul_drv/ul_drv/ul_linux.c:73:1: error: called object ‘\"\"’ is not a function
/home/tomas/hairc/ulan-build/host/ul_drv/ul_drv/ul_linux.c:73:1: error: expected ‘)’ before string constant
/home/tomas/hairc/ulan-build/host/ul_drv/ul_drv/ul_linux.c:73:1: error: bit-field ‘<anonymous>’ width not an integer constant
/home/tomas/hairc/ulan-build/host/ul_drv/ul_drv/ul_linux.c:73:1: error: invalid initializer
/home/tomas/hairc/ulan-build/host/ul_drv/ul_drv/ul_linux.c:73:1: error: expected ‘,’ or ‘;’ before string constant
对于许多行来说,这是相同的错误。有代码:
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
module_param_array(chip, charp, &chip_specified, 0); //this is line 73
module_param_array(my_adr, int, &my_adr_specified, 0);
module_param_array(baud, int, &baud_specified, 0);
module_param_array(irq, int, &irq_specified, 0);
module_param_array(port, int, &port_specified, 0);
module_param_array(baudbase, int, &baudbase_specified, 0);
#if defined(UL_WITH_PCI) || defined(UL_WITH_USB)
module_param_array(slot, charp, &slot_specified, 0);
#endif
module_param(debug, int, 0);
module_param(ul_usb_msg_inpr, int, 0);
module_param(ulbuffer, int, 0);
在旧版本的内核中,它可以正常运行(现在我有2.6.38)。
有人知道哪里有问题吗?
这将对我有很大帮助。
谢谢
没有找到相关结果
已邀请:
1 个回复
田损比报