DisplayLink / evdi

Extensible Virtual Display Interface
MIT License
711 stars 185 forks source link

6.10.3: .remove = evdi_platform_device_remove #481

Open dominikzogg opened 2 months ago

dominikzogg commented 2 months ago
make -C /lib/modules/6.10.3-200.fc40.x86_64/build M=$PWD
make[1]: Entering directory '/usr/src/kernels/6.10.3-200.fc40.x86_64'
  CC [M]  /usr/src/evdi-1.14.4/evdi_platform_drv.o
/usr/src/evdi-1.14.4/evdi_platform_drv.c:205:19: error: initialization of ‘int (*)(struct platform_device *)’ from incompatible pointer type ‘void (*)(struct platform_device *)’ [-Wincompatible-pointer-types]
  205 |         .remove = evdi_platform_device_remove,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/evdi-1.14.4/evdi_platform_drv.c:205:19: note: (near initialization for ‘evdi_platform_driver.remove’)
make[3]: *** [scripts/Makefile.build:244: /usr/src/evdi-1.14.4/evdi_platform_drv.o] Error 1
make[2]: *** [/usr/src/kernels/6.10.3-200.fc40.x86_64/Makefile:1946: /usr/src/evdi-1.14.4] Error 2
make[1]: *** [Makefile:252: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.10.3-200.fc40.x86_64'
make: *** [Makefile:87: module] Error 2
wvdakker commented 2 months ago

In evdi_platform_dev.h (line 35) and evdi_platform_dev.c (line 88) there is a error in the IF statements

Change in both files

#if KERNEL_VERSION(6, 10, 0) >= LINUX_VERSION_CODE

to

#if KERNEL_VERSION(6, 10, 0) <= LINUX_VERSION_CODE

Then it builds fine.

aschleifer commented 2 months ago

I can confirm this works for archlinux

dominikzogg commented 2 months ago

@wvdakker when changing the third occurence (see this commit) it works: https://github.com/DisplayLink/evdi/commit/76505e9d1ea8670d101a10896fd67b8203be897c

dominikzogg commented 2 months ago

@mkananov FYI

wvdakker commented 2 months ago

@wvdakker when changing the third occurence (see this commit) it works: 76505e9

Ah it is already merged into main.... great.

dominikzogg commented 2 months ago

@wvdakker i mentioned it cause it seems it was one in the wrong direction

wvdakker commented 2 months ago

@wvdakker i mentioned it cause it seems it was one in the wrong direction

Ah, didnt see you referring... on my phone .....