Open KnightSch opened 2 years ago
Dear,
I solve it on my debian and mageia.
I replace in the line 2332 and 2363 in ch343.c
ASYNCB_INITIALIZED => tty_port_initialized
Best regards, Stéphane.
I tried Stéphane's fix, but I got this error message: ch343.c:2363:15: warning: passing argument 1 of ‘test_bit’ makes integer from pointer without a cast [-Wint-conversion]
error information:
make -C /lib/modules/4.19.0-17-amd64/build M=/home/ys/workdir/ch343ser_linux/driver
make[1]: 进入目录“/usr/src/linux-headers-4.19.0-17-amd64” CC [M] /home/ys/workdir/ch343ser_linux/driver/ch343.o In file included from /usr/src/linux-headers-4.19.0-17-common/include/linux/bitops.h:19, from /usr/src/linux-headers-4.19.0-17-common/include/linux/kernel.h:11, from /home/ys/workdir/ch343ser_linux/driver/ch343.c:26: /home/ys/workdir/ch343ser_linux/driver/ch343.c: In function ‘ch343_resume’: /home/ys/workdir/ch343ser_linux/driver/ch343.c:2332:15: error: ‘ASYNCB_INITIALIZED’ undeclared (first use in this function); did you mean ‘RCU_INITIALIZER’? if (test_bit(ASYNCB_INITIALIZED, &ch343->port.flags)) { ^
~~~~~ /usr/src/linux-headers-4.19.0-17-common/arch/x86/include/asm/bitops.h:342:25: note: in definition of macro ‘test_bit’ (builtin_constant_p((nr)) \ ^~ /home/ys/workdir/ch343ser_linux/driver/ch343.c:2332:15: note: each undeclared identifier is reported only once for each function it appears in if (test_bit(ASYNCB_INITIALIZED, &ch343->port.flags)) { ^~~~~~ /usr/src/linux-headers-4.19.0-17-common/arch/x86/include/asm/bitops.h:342:25: note: in definition of macro ‘test_bit’ (builtin_constant_p((nr)) \ ^~ /home/ys/workdir/ch343ser_linux/driver/ch343.c: In function ‘ch343_reset_resume’: /home/ys/workdir/ch343ser_linux/driver/ch343.c:2363:15: error: ‘ASYNCB_INITIALIZED’ undeclared (first use in this function); did you mean ‘RCU_INITIALIZER’? if (test_bit(ASYNCB_INITIALIZED, &ch343->port.flags)) ^~~~~~ /usr/src/linux-headers-4.19.0-17-common/arch/x86/include/asm/bitops.h:342:25: note: in definition of macro ‘test_bit’ (__builtin_constant_p((nr)) \ ^~ make[4]: [/usr/src/linux-headers-4.19.0-17-common/scripts/Makefile.build:315:/home/ys/workdir/ch343ser_linux/driver/ch343.o] 错误 1 make[3]: [/usr/src/linux-headers-4.19.0-17-common/Makefile:1562:module/home/ys/workdir/ch343ser_linux/driver] 错误 2 make[2]: [Makefile:146:sub-make] 错误 2 make[1]: [Makefile:8:all] 错误 2 make[1]: 离开目录“/usr/src/linux-headers-4.19.0-17-amd64” make: *** [Makefile:5:default] 错误 2