* [PATCH] misc: atmel-ssc: Use of_property_present() for non-boolean properties
@ 2024-11-04 19:06 Rob Herring (Arm)
2024-11-05 12:53 ` Hari.PrasathGE
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring (Arm) @ 2024-11-04 19:06 UTC (permalink / raw)
To: Claudiu Beznea, Arnd Bergmann, Greg Kroah-Hartman, Nicolas Ferre,
Alexandre Belloni
Cc: linux-arm-kernel, linux-kernel
The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
drivers/misc/atmel-ssc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index 6eac0f335915..1d0322dfaf79 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -153,7 +153,7 @@ static int ssc_sound_dai_probe(struct ssc_device *ssc)
ssc->sound_dai = false;
- if (!of_property_read_bool(np, "#sound-dai-cells"))
+ if (!of_property_present(np, "#sound-dai-cells"))
return 0;
id = of_alias_get_id(np, "ssc");
@@ -176,7 +176,7 @@ static void ssc_sound_dai_remove(struct ssc_device *ssc)
#else
static inline int ssc_sound_dai_probe(struct ssc_device *ssc)
{
- if (of_property_read_bool(ssc->pdev->dev.of_node, "#sound-dai-cells"))
+ if (of_property_present(ssc->pdev->dev.of_node, "#sound-dai-cells"))
return -ENOTSUPP;
return 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] misc: atmel-ssc: Use of_property_present() for non-boolean properties
2024-11-04 19:06 [PATCH] misc: atmel-ssc: Use of_property_present() for non-boolean properties Rob Herring (Arm)
@ 2024-11-05 12:53 ` Hari.PrasathGE
0 siblings, 0 replies; 2+ messages in thread
From: Hari.PrasathGE @ 2024-11-05 12:53 UTC (permalink / raw)
To: robh, claudiu.beznea, arnd, gregkh, Nicolas.Ferre,
alexandre.belloni
Cc: linux-arm-kernel, linux-kernel
On 11/5/24 12:36 AM, Rob Herring (Arm) wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> The use of of_property_read_bool() for non-boolean properties is
> deprecated in favor of of_property_present() when testing for property
> presence.
>
Thank you for the patch.
Reviewed-by: Hari Prasath Gujulan Elango <hari.prasathge@microchip.com>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> drivers/misc/atmel-ssc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
> index 6eac0f335915..1d0322dfaf79 100644
> --- a/drivers/misc/atmel-ssc.c
> +++ b/drivers/misc/atmel-ssc.c
> @@ -153,7 +153,7 @@ static int ssc_sound_dai_probe(struct ssc_device *ssc)
>
> ssc->sound_dai = false;
>
> - if (!of_property_read_bool(np, "#sound-dai-cells"))
> + if (!of_property_present(np, "#sound-dai-cells"))
> return 0;
>
> id = of_alias_get_id(np, "ssc");
> @@ -176,7 +176,7 @@ static void ssc_sound_dai_remove(struct ssc_device *ssc)
> #else
> static inline int ssc_sound_dai_probe(struct ssc_device *ssc)
> {
> - if (of_property_read_bool(ssc->pdev->dev.of_node, "#sound-dai-cells"))
> + if (of_property_present(ssc->pdev->dev.of_node, "#sound-dai-cells"))
> return -ENOTSUPP;
>
> return 0;
> --
> 2.45.2
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-05 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-04 19:06 [PATCH] misc: atmel-ssc: Use of_property_present() for non-boolean properties Rob Herring (Arm)
2024-11-05 12:53 ` Hari.PrasathGE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox