From 667ef768a049a1c70d607419fc46eb15003d7ba1 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Wed, 4 Sep 2024 12:42:49 +0300 Subject: [PATCH] scst_local: Port to Linux kernel v6.11 Support for the following driver core changes in the Linux kernel v6.11: - d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") --- scst_local/scst_local.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 0e0efedff..902153220 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1500,8 +1500,11 @@ static DRIVER_REMOVE_RET scst_local_driver_remove(struct device *dev) return (DRIVER_REMOVE_RET)0; } -static int scst_local_bus_match(struct device *dev, - struct device_driver *dev_driver) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0) +static int scst_local_bus_match(struct device *dev, struct device_driver *drv) +#else +static int scst_local_bus_match(struct device *dev, const struct device_driver *drv) +#endif { TRACE_ENTRY();