From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Matti Vaittinen <mazziesaccount@gmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Paul Elder <paul.elder@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v6 10/10] media: thp7312: Use helper for iterating named child nodes
Date: Mon, 10 Mar 2025 14:57:40 +0200 [thread overview]
Message-ID: <ab79cf4415d21ff2854fee4f4189fac555c30b7a.1741610847.git.mazziesaccount@gmail.com> (raw)
In-Reply-To: <cover.1741610847.git.mazziesaccount@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]
Slightly simplify code iterating the child nodes with specific names
using the new fwnode_for_each_available_named_child_node().
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
---
Revision history:
v5 => v6:
- New patch
NOTE: This patch depends on the patch:
[2/10] "property: Add functions to iterate named child"
Compile-tested only!
---
drivers/media/i2c/thp7312.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/media/i2c/thp7312.c b/drivers/media/i2c/thp7312.c
index 8852c56431fe..104754b2ace2 100644
--- a/drivers/media/i2c/thp7312.c
+++ b/drivers/media/i2c/thp7312.c
@@ -2067,11 +2067,9 @@ static int thp7312_parse_dt(struct thp7312_device *thp7312)
return -EINVAL;
}
- fwnode_for_each_available_child_node(sensors, node) {
- if (fwnode_name_eq(node, "sensor")) {
- if (!thp7312_sensor_parse_dt(thp7312, node))
- num_sensors++;
- }
+ fwnode_for_each_available_named_child_node(sensors, node, "sensor") {
+ if (!thp7312_sensor_parse_dt(thp7312, node))
+ num_sensors++;
}
fwnode_handle_put(sensors);
--
2.48.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-03-10 12:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 12:53 [PATCH v6 00/10] Support ROHM BD79124 ADC Matti Vaittinen
2025-03-10 12:54 ` [PATCH v6 01/10] dt-bindings: ROHM BD79124 ADC/GPO Matti Vaittinen
2025-03-10 12:55 ` [PATCH v6 02/10] property: Add functions to iterate named child Matti Vaittinen
2025-03-10 14:25 ` Andy Shevchenko
2025-03-10 20:19 ` Jonathan Cameron
2025-03-13 6:42 ` Matti Vaittinen
2025-03-10 14:51 ` Andy Shevchenko
2025-03-10 18:12 ` Sakari Ailus
2025-03-10 12:56 ` [PATCH v6 03/10] iio: adc: add helpers for parsing ADC nodes Matti Vaittinen
2025-03-10 12:56 ` [PATCH v6 04/10] iio: adc: rzg2l_adc: Use adc-helpers Matti Vaittinen
2025-03-10 20:22 ` Jonathan Cameron
2025-03-10 12:56 ` [PATCH v6 05/10] iio: adc: sun20i-gpadc: " Matti Vaittinen
2025-03-10 20:23 ` Jonathan Cameron
2025-03-10 12:56 ` [PATCH v6 06/10] iio: adc: Support ROHM BD79124 ADC Matti Vaittinen
2025-03-10 20:26 ` Jonathan Cameron
2025-03-10 12:56 ` [PATCH v6 07/10] MAINTAINERS: Add IIO ADC helpers Matti Vaittinen
2025-03-10 12:57 ` [PATCH v6 08/10] MAINTAINERS: Add ROHM BD79124 ADC/GPO Matti Vaittinen
2025-03-10 12:57 ` [PATCH net-next v6 09/10] net: gianfar: Use device_get_child_node_count_named() Matti Vaittinen
2025-03-10 12:57 ` Matti Vaittinen [this message]
2025-03-15 18:41 ` [PATCH v6 10/10] media: thp7312: Use helper for iterating named child nodes Laurent Pinchart
2025-03-10 20:27 ` [PATCH v6 00/10] Support ROHM BD79124 ADC Jonathan Cameron
2025-03-11 5:49 ` Matti Vaittinen
2025-03-15 18:28 ` Jonathan Cameron
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=ab79cf4415d21ff2854fee4f4189fac555c30b7a.1741610847.git.mazziesaccount@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mchehab@kernel.org \
--cc=paul.elder@ideasonboard.com \
/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
all inboxes | Powered by JetHome®