diff options
author | Uma Krishnan <ukrishn@linux.vnet.ibm.com> | 2018-05-11 21:06:19 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-05-18 17:22:10 +0200 |
commit | cd43c221bb5eb5a6400a62ae44a9979c8fc6c87e (patch) | |
tree | d8fec09c3c66c80e73a0052581e12ffde228a177 /drivers/scsi/cxlflash/main.h | |
parent | scsi: cxlflash: Abstract hardware dependent assignments (diff) | |
download | linux-cd43c221bb5eb5a6400a62ae44a9979c8fc6c87e.tar.xz linux-cd43c221bb5eb5a6400a62ae44a9979c8fc6c87e.zip |
scsi: cxlflash: Isolate external module dependencies
Depending on the underlying transport, cxlflash has a dependency on either
the CXL or OCXL drivers, which are enabled via their Kconfig option.
Instead of having a module wide dependency on these config options, it is
better to isolate the object modules that are dependent on the CXL and OCXL
drivers and adjust the module dependencies accordingly.
This commit isolates the object files that are dependent on CXL and/or
OCXL. The cxl/ocxl fops used in the core driver are tucked under an ifdef to
avoid compilation errors.
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/cxlflash/main.h b/drivers/scsi/cxlflash/main.h index ed4908e5dffb..2a3977823812 100644 --- a/drivers/scsi/cxlflash/main.h +++ b/drivers/scsi/cxlflash/main.h @@ -107,10 +107,15 @@ cxlflash_assign_ops(struct dev_dependent_vals *ddv) { const struct cxlflash_backend_ops *ops = NULL; +#ifdef CONFIG_OCXL if (ddv->flags & CXLFLASH_OCXL_DEV) ops = &cxlflash_ocxl_ops; +#endif + +#ifdef CONFIG_CXL if (!(ddv->flags & CXLFLASH_OCXL_DEV)) ops = &cxlflash_cxl_ops; +#endif return ops; } |