xmm7360 / xmm7360-usb-modeswitch

Tools for the Fibocom L850-GL / Intel XMM7360 LTE modem
122 stars 21 forks source link

Lenovo T490s error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types] #32

Open ealcaniz opened 3 years ago

ealcaniz commented 3 years ago

I am trying with Fedora 33 and Lenovo T490S

[ealcaniz@ealcaniz acpi_call]$ make && sudo make install make -C /lib/modules/5.10.22-200.fc33.x86_64/build M=/home/ealcaniz/git/acpi_call modules make[1]: Entering directory '/usr/src/kernels/5.10.22-200.fc33.x86_64' CC [M] /home/ealcaniz/git/acpi_call/acpi_call.o /home/ealcaniz/git/acpi_call/acpi_call.c: In function ‘init_acpi_call’: /home/ealcaniz/git/acpi_call/acpi_call.c:355:53: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types] 355 &proc_acpi_operations); ^~~~~
struct file_operations *

In file included from /home/ealcaniz/git/acpi_call/acpi_call.c:6: ./include/linux/proc_fs.h:109:122: note: expected ‘const struct proc_ops ’ but argument is of type ‘struct file_operations ’ 109 | struct proc_dir_entry proc_create(const char name, umode_t mode, struct proc_dir_entry parent, const struct proc_ops proc_ops); | ~~~~~^~ cc1: some warnings being treated as errors make[2]: [scripts/Makefile.build:279: /home/ealcaniz/git/acpi_call/acpi_call.o] Error 1 make[1]: [Makefile:1802: /home/ealcaniz/git/acpi_call] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.10.22-200.fc33.x86_64' make: *** [Makefile:8: default] Error 2

Any ideas?

HenryRc0 commented 3 years ago

Hi ealcaniz,

The kernel interface has changed (already a couple releases ago). What I did was to use the acpi_call module from tlp.

  1. Install the repo dnf install https://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm

  2. install the module dnf install akmod-acpi_call

Works here on F34

Tabish1511 commented 2 months ago

Hi ealcaniz,

The kernel interface has changed (already a couple releases ago). What I did was to use the acpi_call module from tlp.

  1. Install the repo dnf install https://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm
  2. install the module dnf install akmod-acpi_call

Works here on F34

hey bud, I am having trouble with the above error, may you kindly explain your solution and how it ties with this 'usb-modeswitch'. Thanks!