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>
This commit is contained in:
Uma Krishnan
2018-05-11 14:06:05 -05:00
committed by Martin K. Petersen
parent 5e12397a97
commit de5d35aff5
2 changed files with 17 additions and 5 deletions

View File

@@ -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