misc: atmel-ssc: Use of_property_present() for non-boolean properties
PATCH 1/1 misc: atmel-ssc: Use of_property_present() for non-boolean properties
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) <[email protected]>
--- drivers/misc/atmel-ssc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/atmel-ssc.c +2 -2
@@ -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 ;
Signature · 1 line
2.45.2
Quoted 6 lines · Rob Herring (Arm)
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 ofof_property_present()when testing for property presence.
Thank you for the patch.
Reviewed-by Hari Prasath Gujulan Elango <[email protected]>
Quoted 31 lines
Signed-off-by Rob Herring (Arm) <[email protected]>--- drivers/misc/atmel-ssc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/misc/atmel-ssc.c +2
-3@@ -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