diff options
author | Uma Krishnan <ukrishn@linux.vnet.ibm.com> | 2018-05-11 14:06:05 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-05-18 11:22:10 -0400 |
commit | de5d35aff5b34bc91a83adb0bf1788d3d23e92f4 (patch) | |
tree | c57d9a6eee33197af3ec9789b21000fbacd652fc /drivers/scsi/cxlflash/main.c | |
parent | 5e12397a9706391543e87cf088fff89fe05f0ad0 (diff) | |
download | blackbird-op-linux-de5d35aff5b34bc91a83adb0bf1788d3d23e92f4.tar.gz blackbird-op-linux-de5d35aff5b34bc91a83adb0bf1788d3d23e92f4.zip |
scsi: cxlflash: Abstract hardware dependent assignments
As a staging cleanup to support transport specific builds of the cxlflash
module, relocate device dependent assignments to header files. This will
avoid littering the core driver with conditional compilation logic.
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.c')
-rw-r--r-- | drivers/scsi/cxlflash/main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index c91e9127fc79..cd7dcc578dfb 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c @@ -3708,11 +3708,8 @@ static int cxlflash_probe(struct pci_dev *pdev, cfg->init_state = INIT_STATE_NONE; cfg->dev = pdev; cfg->cxl_fops = cxlflash_cxl_fops; - - if (ddv->flags & CXLFLASH_OCXL_DEV) - cfg->ops = &cxlflash_ocxl_ops; - else - cfg->ops = &cxlflash_cxl_ops; + cfg->ops = cxlflash_assign_ops(ddv); + WARN_ON_ONCE(!cfg->ops); /* * Promoted LUNs move to the top of the LUN table. The rest stay on |