mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] PCI: epf-test: Use dmaengine_has_cap() instead of dma_has_cap()
@ 2026-11-06 22:21 Frank.Li
  0 siblings, 0 replies; only message in thread
From: Frank.Li @ 2026-11-06 22:21 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Frank Li, Bjorn Helgaas, Niklas Cassel,
	Koichiro Den, Andy Shevchenko, open list:PCI ENDPOINT SUBSYSTEM,
	open list
  Cc: imx, Frank Li

From: Frank Li <Frank.Li@nxp.com>

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@nxp.com>
---
 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-06 22:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-06 22:21 [PATCH 1/1] PCI: epf-test: Use dmaengine_has_cap() instead of dma_has_cap() Frank.Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®