我们有个老产品需要CH9344 在linux3.0.35下的驱动,论坛上最新的1.8版本驱动需要内核版本在3.4以上。能否将老版本驱动发我一份,谢谢!邮箱:个人信息保护,已隐藏
热门产品 :
CH390:以太网控制器芯片
我们有个老产品需要CH9344 在linux3.0.35下的驱动,论坛上最新的1.8版本驱动需要内核版本在3.4以上。能否将老版本驱动发我一份,谢谢!邮箱:个人信息保护,已隐藏
您好,邮件已发送,请注意查收。
已收到,但是编译有问题:
CHK include/linux/version.h CHK include/generated/utsrelease.h make[1]: “include/generated/mach-types.h”已是最新。 CALL scripts/checksyscalls.sh CHK include/generated/compile.h CC drivers/usb/serial/ch9344.o drivers/usb/serial/ch9344.c: In function 'ch9344_cmd_irq': drivers/usb/serial/ch9344.c:420:8: error: implicit declaration of function 'tty_port_tty_hangup' [-Werror=implicit-function-declaration] drivers/usb/serial/ch9344.c: In function 'ch9344_tty_set_termios': drivers/usb/serial/ch9344.c:1560:29: warning: initialization from incompatible pointer type [enabled by default] drivers/usb/serial/ch9344.c:1580:17: error: incompatible types when assigning to type 'struct ktermios *' from type 'struct ktermios' drivers/usb/serial/ch9344.c: In function 'ch9344_probe': drivers/usb/serial/ch9344.c:1881:17: warning: unused variable 'tty_dev' [-Wunused-variable] drivers/usb/serial/ch9344.c: At top level: drivers/usb/serial/ch9344.c:708:13: warning: 'ch9344_tty_unregister' defined but not used [-Wunused-function] cc1: some warnings being treated as errors scripts/Makefile.build:305: recipe for target 'drivers/usb/serial/ch9344.o' failed make[3]: *** [drivers/usb/serial/ch9344.o] Error 1 scripts/Makefile.build:441: recipe for target 'drivers/usb/serial' failed make[2]: *** [drivers/usb/serial] Error 2 scripts/Makefile.build:441: recipe for target 'drivers/usb' failed make[1]: *** [drivers/usb] Error 2 Makefile:947: recipe for target 'drivers' failed make: *** [drivers] Error 2
1.
error: implicit declaration of function 'tty_port_tty_hangup'
这个函数我全局搜索了,除了ch9344.c中有引用,内核其他地方未见引用和定义。
2.
error: incompatible types when assigning to type 'struct ktermios *' from type 'struct ktermios'
等号两边类型不匹配
您好,重新发了驱动,麻烦重新编译试下。
你好,编译后有一处warning:
CC drivers/usb/serial/ch9344.o drivers/usb/serial/ch9344.c: In function 'ch9344_tty_set_termios': drivers/usb/serial/ch9344.c:1532:29: warning: initialization from incompatible pointer type [enabled by default]
相关代码:
static void ch9344_tty_set_termios(struct tty_struct *tty, struct ktermios *termios_old) { struct ch9344 *ch9344 = tty->driver_data; struct ktermios *termios = &tty->termios; // tty->termios为struct ktermios *类型 。。。 }
修改为:
static void ch9344_tty_set_termios(struct tty_struct *tty, struct ktermios *termios_old) { struct ch9344 *ch9344 = tty->driver_data; struct ktermios *termios = tty->termios; 。。。 }
已编译通过,目前在做测试