fortian / cp210x Goto Github PK
View Code? Open in Web Editor NEWLinux driver for Silicon Labs CP210x USB serial chips supporting GPS PPS over USB
License: GNU General Public License v2.0
Linux driver for Silicon Labs CP210x USB serial chips supporting GPS PPS over USB
License: GNU General Public License v2.0
Hello,
I can't get this driver to compile it throws this error:
Kernel version: 4.19.0-10-amd64
make -C /lib/modules/4.19.0-10-amd64/build M=/home/user/cp210x modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.0-10-amd64'
CC [M] /home/user/cp210x/cp210x.o
/home/user/cp210x/cp210x.c: In function ‘cp210x_get_tx_queue_byte_count’:
/home/user/cp210x/cp210x.c:703:26: error: dereferencing pointer to incomplete type ‘struct cp210x_comm_status’
sts = kmalloc(sizeof(*sts), GFP_KERNEL);
^~~~
/home/user/cp210x/cp210x.c: In function ‘cp210x_get_termios_port’:
/home/user/cp210x/cp210x.c:781:9: error: passing argument 5 of ‘cp210x_get_config’ from incompatible pointer type [-Werror=incompatible-pointer-types]
&bits, 2);
^~~~~
/home/user/cp210x/cp210x.c:389:42: note: expected ‘unsigned int *’ but argument is of type ‘u16 *’ {aka ‘short unsigned int *’}
u8 request, int value, unsigned int *data, unsigned int size) {
~~~~~~~~~~~~~~^~~~
/home/user/cp210x/cp210x.c: In function ‘cp210x_set_termios’:
/home/user/cp210x/cp210x.c:941:37: error: passing argument 5 of ‘cp210x_get_config’ from incompatible pointer type [-Werror=incompatible-pointer-types]
CP210X_GET_LINE_CTL, 0, &bits, 2);
^~~~~
/home/user/cp210x/cp210x.c:389:42: note: expected ‘unsigned int *’ but argument is of type ‘u16 *’ {aka ‘short unsigned int *’}
u8 request, int value, unsigned int *data, unsigned int size) {
~~~~~~~~~~~~~~^~~~
/home/user/cp210x/cp210x.c:982:37: error: passing argument 5 of ‘cp210x_get_config’ from incompatible pointer type [-Werror=incompatible-pointer-types]
CP210X_GET_LINE_CTL, 0, &bits, 2);
^~~~~
/home/user/cp210x/cp210x.c:389:42: note: expected ‘unsigned int *’ but argument is of type ‘u16 *’ {aka ‘short unsigned int *’}
u8 request, int value, unsigned int *data, unsigned int size) {
~~~~~~~~~~~~~~^~~~
/home/user/cp210x/cp210x.c:1009:37: error: passing argument 5 of ‘cp210x_get_config’ from incompatible pointer type [-Werror=incompatible-pointer-types]
CP210X_GET_LINE_CTL, 0, &bits, 2);
^~~~~
/home/user/cp210x/cp210x.c:389:42: note: expected ‘unsigned int *’ but argument is of type ‘u16 *’ {aka ‘short unsigned int *’}
u8 request, int value, unsigned int *data, unsigned int size) {
~~~~~~~~~~~~~~^~~~
/home/user/cp210x/cp210x.c: In function ‘cp210x_tiocmget’:
/home/user/cp210x/cp210x.c:1099:31: error: passing argument 5 of ‘cp210x_get_config’ from incompatible pointer type [-Werror=incompatible-pointer-types]
CP210X_GET_MDMSTS, 0, &control, 1);
^~~~~~~~
/home/user/cp210x/cp210x.c:389:42: note: expected ‘unsigned int *’ but argument is of type ‘u8 *’ {aka ‘unsigned char *’}
u8 request, int value, unsigned int *data, unsigned int size) {
~~~~~~~~~~~~~~^~~~
/home/user/cp210x/cp210x.c: In function ‘cp210x_process_read_urb’:
/home/user/cp210x/cp210x.c:1238:20: warning: unused variable ‘max_packet_size’ [-Wunused-variable]
unsigned short max_packet_size = 128;
^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-4.19.0-10-common/scripts/Makefile.build:315: /home/user/cp210x/cp210x.o] Error 1
make[3]: *** [/usr/src/linux-headers-4.19.0-10-common/Makefile:1545: _module_/home/user/cp210x] Error 2
make[2]: *** [Makefile:146: sub-make] Error 2
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.0-10-amd64'
make: *** [Makefile:5: all] Error 2
Could you please help me to make it compile successfully?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.