]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dmaengine: Use device_match_of_node() helper
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 9 Jan 2026 17:35:42 +0000 (18:35 +0100)
committerVinod Koul <vkoul@kernel.org>
Thu, 26 Feb 2026 15:30:01 +0000 (21:00 +0530)
Instead of open coding, use device_match_of_node() helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260109173718.3605829-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dmaengine.c

index eb54e2b58d4470c933d6c68075b9e9f0e4fe65b0..ec2a96e3a213bf8e2cc4a6f9787e154cd4dfcb57 100644 (file)
@@ -765,7 +765,7 @@ struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask,
        mutex_lock(&dma_list_mutex);
        list_for_each_entry_safe(device, _d, &dma_device_list, global_node) {
                /* Finds a DMA controller with matching device node */
-               if (np && device->dev->of_node && np != device->dev->of_node)
+               if (np && !device_match_of_node(device->dev, np))
                        continue;
 
                chan = find_candidate(device, mask, fn, fn_param);