1
您好,我有與uLan
驅動Linux
驅動程序的問題。 當我編譯它,我得到的錯誤:module_param_array()Ubuntu的11.04(內核2.6.38)問題
/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)。 有誰知道問題在哪裏? 它會幫助我很多。 謝謝
你是怎麼試圖編譯uLan驅動程序的?你有沒有安裝編譯內核模塊的所有編譯依賴項? (包括正確的內核頭文件?) – sarnold