Skip to content

Commit

Permalink
fix: fix linux 6.13 build
Browse files Browse the repository at this point in the history
Upstream Commit e70140ba0d2b1a30467d4af6bcfe761327b9ec95
(Get rid of 'remove_new' relic from platform driver struct) changes
the struct platform_driver signature, we should apply changes
correspondingly but still retain the compatibility for old
kernels.

Signed-off-by: Yiyang Wu <toolmanp@tlmp.cc>
  • Loading branch information
ToolmanP committed Jan 23, 2025
1 parent f8900aa commit 950d527
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kernel_module/legion-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
#include <linux/platform_profile.h>
#include <linux/types.h>
#include <linux/wmi.h>
#include <linux/version.h>

MODULE_LICENSE("GPL");
MODULE_AUTHOR("johnfan");
Expand Down Expand Up @@ -6266,7 +6267,11 @@ MODULE_DEVICE_TABLE(acpi, legion_device_ids);

static struct platform_driver legion_driver = {
.probe = legion_add,
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
.remove_new = legion_remove,
#else
.remove = legion_remove,
#endif
.resume = legion_resume,
.driver = {
.name = "legion",
Expand Down

0 comments on commit 950d527

Please sign in to comment.