8000 compilation error on archlinux with kernel 5.17.5-zen1 · Issue #10 · WCHSoftGroup/ch343ser_linux · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

compilation error on archlinux with kernel 5.17.5-zen1 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Diogoflsilva opened this issue May 3, 2022 · 2 comments
Open

compilation error on archlinux with kernel 5.17.5-zen1 #10

Diogoflsilva opened this issue May 3, 2022 · 2 comments

Comments

@Diogoflsilva
Copy link

I have an esp32 with ch9102x chip so I looked for a driver and found this repo
but I'm not sure why I'm getting this compilation error if you could please help me out that'd be great

make -C /lib/modules/5.17.5-zen1-1-zen/build M=/home/silva/git/ch343ser_linux/driver
make[1]: Entering directory '/usr/lib/modules/5.17.5-zen1-1-zen/build'
CC [M] /home/silva/git/ch343ser_linux/driver/ch343.o
/home/silva/git/ch343ser_linux/driver/ch343.c:1684:33: error: initialization of ‘unsigned int (*)(struct tty_struct )’ from incompatible pointer type ‘int ()(struct tty_struct )’ [-Werror=incompatible-pointer-types]
1684 | .write_room = ch343_tty_write_room,
| ^~~~~~~~~~~~~~~~~~~~
/home/silva/git/ch343ser_linux/driver/ch343.c:1684:33: note: (near initialization for ‘ch343_ops.write_room’)
/home/silva/git/ch343ser_linux/driver/ch343.c:1686:33: error: initialization of ‘unsigned int (
)(struct tty_struct )’ from incompatible pointer type ‘int ()(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
1686 | .chars_in_buffer = ch343_tty_chars_in_buffer,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/silva/git/ch343ser_linux/driver/ch343.c:1686:33: note: (near initialization for ‘ch343_ops.chars_in_buffer’)
/home/silva/git/ch343ser_linux/driver/ch343.c: In function ‘ch343_init’:
/home/silva/git/ch343ser_linux/driver/ch343.c:1699:28: error: implicit declaration of function ‘alloc_tty_driver’ [-Werror=implicit-function-declaration]
1699 | ch343_tty_driver = alloc_tty_driver(CH343_TTY_MINORS);
| ^~~~~~~~~~~~~~~~
/home/silva/git/ch343ser_linux/driver/ch343.c:1699:26: warning: assignment to ‘struct tty_driver *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
1699 | ch343_tty_driver = alloc_tty_driver(CH343_TTY_MINORS);
| ^
/home/silva/git/ch343ser_linux/driver/ch343.c:1716:17: error: implicit declaration of function ‘put_tty_driver’ [-Werror=implicit-function-declaration]
1716 | put_tty_driver(ch343_tty_driver);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: /home/silva/git/ch343ser_linux/driver/ch343.o] Error 1
make[1]: *** [Makefile:1826: /home/silva/git/ch343ser_linux/driver] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.17.5-zen1-1-zen/build'
make: *** [Makefile:5: default] Error 2

@GreatestCapacity
Copy link

Change the function name:
alloc_tty_driver -> tty_alloc_driver
put_tty_driver -> tty_driver_kref_put

Or

Clone from this: https://github.com/GreatestCapacity/ch343ser_linux

I've submit a pull request to this project, but not be approved yet.

@taotieren
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0