public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Vinod Koul <vkoul@kernel.org>
Subject: [PATCH v3 2/3] dmaengine: Use device_match_of_node() helper
Date: Fri,  9 Jan 2026 18:35:42 +0100	[thread overview]
Message-ID: <20260109173718.3605829-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20260109173718.3605829-1-andriy.shevchenko@linux.intel.com>

Instead of open coding, use device_match_of_node() helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/dma/dmaengine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 8fe552c74eb8..ca1723a34779 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -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);
-- 
2.50.1


  parent reply	other threads:[~2026-01-09 17:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 17:35 [PATCH v3 0/3] dmaengine: A little cleanup and refactoring Andy Shevchenko
2026-01-09 17:35 ` [PATCH v3 1/3] dmaengine: Refactor devm_dma_request_chan() for readability Andy Shevchenko
2026-01-09 17:35 ` Andy Shevchenko [this message]
2026-01-09 17:35 ` [PATCH v3 3/3] dmaengine: Sort headers alphabetically Andy Shevchenko
2026-01-09 21:07 ` [PATCH v3 0/3] dmaengine: A little cleanup and refactoring Dave Jiang
2026-01-12 20:23 ` Frank Li
2026-01-19  7:52   ` Andy Shevchenko
2026-02-25 11:24 ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260109173718.3605829-3-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox