scst_local: Port to Linux kernel v5.15

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9503 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2021-09-03 04:59:06 +00:00
parent bdf56c04b6
commit cb74f66766
+9 -2
View File
@@ -1653,7 +1653,14 @@ out:
return ret;
}
static int scst_local_driver_remove(struct device *dev)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
/* See also commit fc7a6209d571 ("bus: Make remove callback return void") */
#define DRIVER_REMOVE_RET int
#else
#define DRIVER_REMOVE_RET void
#endif
static DRIVER_REMOVE_RET scst_local_driver_remove(struct device *dev)
{
struct scst_local_sess *sess;
struct Scsi_Host *shost = NULL;
@@ -1670,7 +1677,7 @@ static int scst_local_driver_remove(struct device *dev)
scsi_host_put(shost);
TRACE_EXIT();
return 0;
return (DRIVER_REMOVE_RET)0;
}
static int scst_local_bus_match(struct device *dev,