From 3fac3af0c7e6f8da9503ad3a0b6b1f1d52c9704c Mon Sep 17 00:00:00 2001 From: pallaswept <132128962+pallaswept@users.noreply.github.com> Date: Mon, 16 Oct 2023 02:58:05 +1100 Subject: [PATCH 1/4] Update bus.c doubtful --- bus/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bus/bus.c b/bus/bus.c index 4a6c64f..911e8a6 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -113,11 +113,11 @@ static void gip_bus_remove(struct device *dev) } #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) -static int gip_bus_remove_compat(struct device *dev) +static void gip_bus_remove_compat(struct device *dev) { gip_bus_remove(dev); - return 0; + return; } #endif From 1e0208e60d68229fbf793c1ae7bf54c95fe89e54 Mon Sep 17 00:00:00 2001 From: pallaswept <132128962+pallaswept@users.noreply.github.com> Date: Mon, 16 Oct 2023 05:20:14 +1100 Subject: [PATCH 2/4] Remove superflous return Remove superfluous, implied, return statement --- bus/bus.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/bus/bus.c b/bus/bus.c index 911e8a6..04c7aed 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -116,8 +116,6 @@ static void gip_bus_remove(struct device *dev) static void gip_bus_remove_compat(struct device *dev) { gip_bus_remove(dev); - - return; } #endif From b0a811e48601bbcc546e55a91d6e2fc2e0f7209e Mon Sep 17 00:00:00 2001 From: SavageCore Date: Sun, 5 Nov 2023 18:38:27 +0000 Subject: [PATCH 3/4] Support for 5.13 and 5.15 --- bus/bus.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bus/bus.c b/bus/bus.c index 04c7aed..5c3366d 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -112,7 +112,14 @@ static void gip_bus_remove(struct device *dev) up(&client->drv_lock); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 13, 0) +static int gip_bus_remove_compat(struct device *dev) +{ + gip_bus_remove(dev); + + return 0; +} +#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) static void gip_bus_remove_compat(struct device *dev) { gip_bus_remove(dev); From 5c6981aa04743690eeb0919d594a9772c20770eb Mon Sep 17 00:00:00 2001 From: Daniel Lundqvist Date: Sat, 25 May 2024 10:34:52 +0200 Subject: [PATCH 4/4] bus: Remove unnecessary compatibility remove callback for 5.15. Since 5.15 it seems the callback returns void, which the compatibilty callback for 5.15 returned. So just drop it. --- bus/bus.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bus/bus.c b/bus/bus.c index 5c3366d..7458785 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -119,18 +119,13 @@ static int gip_bus_remove_compat(struct device *dev) return 0; } -#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) -static void gip_bus_remove_compat(struct device *dev) -{ - gip_bus_remove(dev); -} #endif static struct bus_type gip_bus_type = { .name = "xone-gip", .match = gip_bus_match, .probe = gip_bus_probe, -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 13, 0) .remove = gip_bus_remove_compat, #else .remove = gip_bus_remove,