From 345c3b8e0dd7ead9483397a2ff0a63afaa81c3fe Mon Sep 17 00:00:00 2001 From: rjkm Date: Sat, 16 Nov 2024 14:25:10 +0100 Subject: [PATCH] fix compilation with newer kernels --- ddbridge/octonet-main.c | 6 ++++++ frontends/mxl5xx.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ddbridge/octonet-main.c b/ddbridge/octonet-main.c index 98efd72..923c58e 100644 --- a/ddbridge/octonet-main.c +++ b/ddbridge/octonet-main.c @@ -24,7 +24,11 @@ #include "ddbridge.h" #include "ddbridge-io.h" +#if (KERNEL_VERSION(6, 11, 0) > LINUX_VERSION_CODE) static int __exit octonet_remove(struct platform_device *pdev) +#else +static void __exit octonet_remove(struct platform_device *pdev) +#endif { struct ddb *dev; @@ -43,7 +47,9 @@ static int __exit octonet_remove(struct platform_device *pdev) ddb_ports_release(dev); ddb_unmap(dev); platform_set_drvdata(pdev, 0); +#if (KERNEL_VERSION(6, 11, 0) > LINUX_VERSION_CODE) return 0; +#endif } static int __init octonet_probe(struct platform_device *pdev) diff --git a/frontends/mxl5xx.c b/frontends/mxl5xx.c index b2a23f8..422d64e 100644 --- a/frontends/mxl5xx.c +++ b/frontends/mxl5xx.c @@ -39,7 +39,9 @@ #include #include #include +#if (KERNEL_VERSION(6, 12, 0) > LINUX_VERSION_CODE) #include +#endif #include #include "mxl5xx.h"