summary refs log tree commit diff
path: root/drivers/scsi/cxlflash/Makefile
diff options
context:
space:
mode:
authorUma Krishnan <ukrishn@linux.vnet.ibm.com>2018-05-11 14:06:19 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2018-05-18 11:22:10 -0400
commitcd43c221bb5eb5a6400a62ae44a9979c8fc6c87e (patch)
treed8fec09c3c66c80e73a0052581e12ffde228a177 /drivers/scsi/cxlflash/Makefile
parentde5d35aff5b34bc91a83adb0bf1788d3d23e92f4 (diff)
downloadlinux-cd43c221bb5eb5a6400a62ae44a9979c8fc6c87e.tar.gz
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/Makefile')
-rw-r--r--drivers/scsi/cxlflash/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/cxlflash/Makefile b/drivers/scsi/cxlflash/Makefile
index 5124c68f8d88..283377d8f6fb 100644
--- a/drivers/scsi/cxlflash/Makefile
+++ b/drivers/scsi/cxlflash/Makefile
@@ -1,2 +1,4 @@
 obj-$(CONFIG_CXLFLASH) += cxlflash.o
-cxlflash-y += main.o superpipe.o lunmgt.o vlun.o cxl_hw.o ocxl_hw.o
+cxlflash-y += main.o superpipe.o lunmgt.o vlun.o
+cxlflash-$(CONFIG_CXL) += cxl_hw.o
+cxlflash-$(CONFIG_OCXL) += ocxl_hw.o