All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: Use of_property_read_bool() for boolean properties
Date: Tue, 18 Apr 2023 11:25:57 -0500	[thread overview]
Message-ID: <20230418162557.GD1764573-robh@kernel.org> (raw)
In-Reply-To: <20230310144734.1546587-1-robh@kernel.org>

On Fri, Mar 10, 2023 at 08:47:33AM -0600, Rob Herring wrote:
> It is preferred to use typed property access functions (i.e.
> of_property_read_<type> functions) rather than low-level
> of_get_property/of_find_property functions for reading properties.
> Convert reading boolean properties to to of_property_read_bool().
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  sound/ppc/tumbler.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Ping!

> 
> diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
> index 6c882873b344..12f1e10db1c4 100644
> --- a/sound/ppc/tumbler.c
> +++ b/sound/ppc/tumbler.c
> @@ -1361,7 +1361,7 @@ int snd_pmac_tumbler_init(struct snd_pmac *chip)
>  
>  	for_each_child_of_node(chip->node, np) {
>  		if (of_node_name_eq(np, "sound")) {
> -			if (of_get_property(np, "has-anded-reset", NULL))
> +			if (of_property_read_bool(np, "has-anded-reset"))
>  				mix->anded_reset = 1;
>  			if (of_property_present(np, "layout-id"))
>  				mix->reset_on_sleep = 0;
> -- 
> 2.39.2
> 

  reply	other threads:[~2023-04-18 16:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 14:47 [PATCH] ALSA: Use of_property_read_bool() for boolean properties Rob Herring
2023-04-18 16:25 ` Rob Herring [this message]
2023-04-19  6:29   ` Takashi Iwai
2023-04-19  6:29     ` Takashi Iwai
2023-04-19  6:28 ` Takashi Iwai
2023-04-19  6:28   ` Takashi Iwai

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=20230418162557.GD1764573-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.