mirror of
https://github.com/SCST-project/scst.git
synced 2026-09-25 09:24:25 +00:00
scst: Unbreak the build for kernel versions <= 6.3
The previous series of patches introduced the use of a const pointer to
scsi_host_template. However, scsi_host_alloc() uses a non-const pointer
prior to kernel version 6.4, causing the build to throw the following
error:
passing argument 1 of ‘scsi_host_alloc’ discards ‘const’
qualifier from pointer target type
Hence, cast away the constness to resolve the error.
This commit is contained in:
@@ -1425,7 +1425,8 @@ static int scst_local_driver_probe(struct device *dev)
|
||||
|
||||
TRACE_DBG("sess %p", sess);
|
||||
|
||||
hpnt = scsi_host_alloc(&scst_lcl_ini_driver_template, sizeof(*sess));
|
||||
hpnt = scsi_host_alloc((struct scsi_host_template *) &scst_lcl_ini_driver_template,
|
||||
sizeof(*sess));
|
||||
if (hpnt == NULL) {
|
||||
PRINT_ERROR("%s", "scsi_register() failed");
|
||||
ret = -ENODEV;
|
||||
|
||||
Reference in New Issue
Block a user