diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c index f79597a7ccf9..99ddb6e6da34 100644 --- a/drivers/dma/dw-edma/dw-edma-pcie.c +++ b/drivers/dma/dw-edma/dw-edma-pcie.c @@ -78,6 +78,7 @@ struct dw_edma_pcie_data { struct dw_edma_pcie_match_data { const struct dw_edma_pcie_data *data; + const struct dw_edma_plat_ops *plat_ops; /* * Mandatory callback. It may leave @pdata unchanged when the static * template already describes the device. @@ -403,7 +404,7 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev, } /* Let device-specific discovery override the static template data. */ - if (!match->parse_caps) + if (!match->parse_caps || !match->plat_ops) return -EINVAL; err = match->parse_caps(pdev, dma_data); @@ -454,7 +455,7 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev, chip->mf = dma_data->mf; chip->nr_irqs = nr_irqs; - chip->ops = &dw_edma_pcie_plat_ops; + chip->ops = match->plat_ops; chip->cfg_non_ll = dma_data->cfg_non_ll; chip->ll_wr_cnt = dma_data->wr_ch_cnt; @@ -593,17 +594,20 @@ static void dw_edma_pcie_remove(struct pci_dev *pdev) static const struct dw_edma_pcie_match_data snps_edda_match_data = { .data = &snps_edda_data, + .plat_ops = &dw_edma_pcie_plat_ops, .parse_caps = dw_edma_pcie_parse_synopsys_caps, }; static const struct dw_edma_pcie_match_data xilinx_mdb_match_data = { .data = &xilinx_mdb_data, + .plat_ops = &dw_edma_pcie_plat_ops, .parse_caps = dw_edma_pcie_parse_xilinx_caps, .flags = DW_EDMA_PCIE_F_DEVMEM_PHYS_OFF, }; static const struct dw_edma_pcie_match_data xilinx_cpm6_dma_match_data = { .data = &xilinx_cpm6_dma_data, + .plat_ops = &dw_edma_pcie_plat_ops, .parse_caps = dw_edma_pcie_parse_xilinx_caps, .flags = DW_EDMA_PCIE_F_DEVMEM_PHYS_OFF, };