mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Paul Elder <paul.elder@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 10/10] media: thp7312: Use helper for iterating named child nodes
Date: Sat, 15 Mar 2025 20:41:11 +0200	[thread overview]
Message-ID: <20250315184111.GA29719@pendragon.ideasonboard.com> (raw)
In-Reply-To: <ab79cf4415d21ff2854fee4f4189fac555c30b7a.1741610847.git.mazziesaccount@gmail.com>

Hi Matti,

Thank you for the patch.

On Mon, Mar 10, 2025 at 02:57:40PM +0200, Matti Vaittinen wrote:
> 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>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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);

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2025-03-15 18:41 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 ` [PATCH v6 10/10] media: thp7312: Use helper for iterating named child nodes Matti Vaittinen
2025-03-15 18:41   ` Laurent Pinchart [this message]
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=20250315184111.GA29719@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.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®