From 0a540a9bd2effa11937db8a8c31e88ba429fa9af Mon Sep 17 00:00:00 2001 From: Ridai Govinda Pombo Date: Thu, 15 Aug 2024 11:21:33 -0300 Subject: [PATCH] Condionally returns void With Linux-6.11, we need this change for it to build successfully. --- system76.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system76.c b/system76.c index 1781a97..8a855a7 100644 --- a/system76.c +++ b/system76.c @@ -224,7 +224,11 @@ static int __init s76_probe(struct platform_device *dev) { return 0; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,11,0) +static void s76_remove(struct platform_device *dev) { +#else static int s76_remove(struct platform_device *dev) { +#endif wmi_remove_notify_handler(S76_EVENT_GUID); nv_hda_exit(); @@ -243,7 +247,9 @@ static int s76_remove(struct platform_device *dev) { ap_led_exit(); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) return 0; +#endif } static int s76_suspend(struct platform_device *dev, pm_message_t status) {