[PATCH 1/1] PCI: epf-test: Use dmaengine_has_cap() instead of dma_has_cap()
From: Frank . Li
Date: Fri Nov 06 2026 - 17:22:12 EST
From: Frank Li <Frank.Li@xxxxxxx>
dmaengine_has_cap() takes a dma_chan pointer and avoids direct access
to the cap_mask field inside struct dma_device, which is a step toward
making struct dma_device internals private.
Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
---
drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index 14fa1fc10ead7..188c533293216 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -371,7 +371,7 @@ static void pci_epf_test_copy(struct pci_epf_test *epf_test,
orig_size = copy_size = le32_to_cpu(reg->size);
if (flags & FLAG_USE_DMA) {
- if (!dma_has_cap(DMA_MEMCPY, epf_test->dma_chan_tx->device->cap_mask)) {
+ if (!dmaengine_has_cap(epf_test->dma_chan_tx, DMA_MEMCPY)) {
dev_err(dev, "DMA controller doesn't support MEMCPY\n");
ret = -EINVAL;
goto set_status;
--
2.43.0