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[1]: Entering directory '/usr/src/linux-headers-5.16.15-76051615-generic'
CC [M] /home/maz/driver/ch343.o
/home/maz/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/maz/driver/ch343.c:1684:33: note: (near initialization for ‘ch343_ops.write_room’)
/home/maz/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/maz/driver/ch343.c:1686:33: note: (near initialization for ‘ch343_ops.chars_in_buffer’)
/home/maz/driver/ch343.c: In function ‘ch343_init’:
/home/maz/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/maz/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/maz/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
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