[RFC net-next 2/4] io_uring/zcrx: Use the new netdev_get_dma_dev() API

From: Dragos Tatulea
Date: Wed Jul 02 2025 - 13:27:48 EST


Using the new DMA dev helper API, there will be an early failure if the
device does not support DMA.

Signed-off-by: Dragos Tatulea <dtatulea@xxxxxxxxxx>
---
io_uring/zcrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 797247a34cb7..93462e5b2207 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -584,7 +584,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
goto err;
}

- ifq->dev = ifq->netdev->dev.parent;
+ ifq->dev = netdev_get_dma_dev(ifq->netdev);
if (!ifq->dev) {
ret = -EOPNOTSUPP;
goto err;
--
2.50.0