summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxlflash/main.h
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2018-07-05 07:26:23 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-07-10 22:29:54 -0400
commit943e59fe78ee870d86c775fc9fee2ab68bd262a3 (patch)
treec1722694d96e514cdd397974ba18325c16c29530 /drivers/scsi/cxlflash/main.h
parenta3440d0d2f57f7ba102fc332086961cf261180af (diff)
downloadop-kernel-dev-943e59fe78ee870d86c775fc9fee2ab68bd262a3.zip
op-kernel-dev-943e59fe78ee870d86c775fc9fee2ab68bd262a3.tar.gz
scsi: cxlflash: fix assignment of the backend operations
commit cd43c221bb5e ("scsi: cxlflash: Isolate external module dependencies") introduced the use of ifdefs to avoid compilation errors when one of the possible backend driver, CXL or OCXL, is not compiled. Unfortunately, the wrong defines are used and the backend ops are never assigned, leading to a kernel crash in any case when the cxlflash module is loaded. Signed-off-by: Cédric Le Goater <clg@kaod.org> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxlflash/main.h')
-rw-r--r--drivers/scsi/cxlflash/main.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/cxlflash/main.h b/drivers/scsi/cxlflash/main.h
index 2a39778..a39be94 100644
--- a/drivers/scsi/cxlflash/main.h
+++ b/drivers/scsi/cxlflash/main.h
@@ -107,12 +107,12 @@ cxlflash_assign_ops(struct dev_dependent_vals *ddv)
{
const struct cxlflash_backend_ops *ops = NULL;
-#ifdef CONFIG_OCXL
+#ifdef CONFIG_OCXL_BASE
if (ddv->flags & CXLFLASH_OCXL_DEV)
ops = &cxlflash_ocxl_ops;
#endif
-#ifdef CONFIG_CXL
+#ifdef CONFIG_CXL_BASE
if (!(ddv->flags & CXLFLASH_OCXL_DEV))
ops = &cxlflash_cxl_ops;
#endif
OpenPOWER on IntegriCloud