MLAB-project / hid-cp2112

Silicon Labs HID USB to SMBus master bridge driver
GNU General Public License v3.0
6 stars 5 forks source link

Building issue with HID-struct #3

Open iDoka opened 8 years ago

iDoka commented 8 years ago

When I build I have several errors, like:

$ make
  CC [M]  /soft/hid-cp2112/hid-cp2112.o
/soft/hid-cp2112/hid-cp2112.c: In function ‘cp2112_gpio_direction_input’:
/soft/hid-cp2112/hid-cp2112.c:177: error: ‘struct hid_device’ has no member named ‘hid_get_raw_report’
/soft/hid-cp2112/hid-cp2112.c:187: error: ‘struct hid_device’ has no member named ‘hid_output_raw_report’
/soft/hid-cp2112/hid-cp2112.c: In function ‘cp2112_gpio_set’:
/soft/hid-cp2112/hid-cp2112.c:209: error: ‘struct hid_device’ has no member named ‘hid_output_raw_report’
/soft/hid-cp2112/hid-cp2112.c: In function ‘cp2112_gpio_get’:
/soft/hid-cp2112/hid-cp2112.c:223: error: ‘struct hid_device’ has no member named ‘hid_get_raw_report’
/soft/hid-cp2112/hid-cp2112.c: In function ‘cp2112_gpio_direction_output’:
/soft/hid-cp2112/hid-cp2112.c:244: error: ‘struct hid_device’ has no member named ‘hid_get_raw_report’
/soft/hid-cp2112/hid-cp2112.c:254: error: ‘struct hid_device’ has no member named ‘hid_output_raw_report’
/soft/hid-cp2112/hid-cp2112.c: In function ‘cp2112_hid_get’:
/soft/hid-cp2112/hid-cp2112.c:274: error: ‘struct hid_device’ has no member named ‘hid_get_raw_report’
/soft/hid-cp2112/hid-cp2112.c: In function ‘cp2112_hid_output’:
/soft/hid-cp2112/hid-cp2112.c:291: error: ‘struct hid_device’ has no member named ‘hid_output_raw_report’
/soft/hid-cp2112/hid-cp2112.c: In function ‘cp2112_read’:
/soft/hid-cp2112/hid-cp2112.c:364: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘size_t’
/soft/hid-cp2112/hid-cp2112.c: In function ‘cp2112_xfer’:
/soft/hid-cp2112/hid-cp2112.c:555: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’
/soft/hid-cp2112/hid-cp2112.c: In function ‘cp2112_probe’:
/soft/hid-cp2112/hid-cp2112.c:960: error: void value not ignored as it ought to be
/soft/hid-cp2112/hid-cp2112.c: In function ‘cp2112_remove’:
/soft/hid-cp2112/hid-cp2112.c:980: error: void value not ignored as it ought to be

make[2]: *** [/soft/hid-cp2112/hid-cp2112.o] Error 1
make[1]: *** [_module_/soft/hid-cp2112] Error 2
make: *** [modules] Error 2

my kernel:

$ uname -a
Linux  4.2.5-1.el6.elrepo.x86_64 #1 SMP Tue Oct 27 14:28:54 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

Which one version of libhid is compatible and how to build cp2112.ko with linking compatible version of libhid?

kaklik commented 8 years ago

nobody tested this code in kernels 3.16 and above. Therefore many incompatibilities may exists. If someone is capable to resolve this issue then should fork a code or create push-request. We do not use this code anymore, because sufficient Python HIDAPI approach exist in our pymlab repository.