drm: Use of_property_present() for non-boolean properties
Subsystems (7)
PATCH 1/1 drm: 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.
--- drivers/gpu/drm/bridge/ite-it66121.c | 2 +- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/drm_panel.c | 2 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/bridge/ite-it66121.c +1 -1
@@ -1480,7 +1480,7 @@ static int it66121_audio_codec_init(struct it66121_ctx *ctx, struct device *dev)dev_dbg (dev,"%s\n" , __func__); -if (!of_property_read_bool (dev->of_node,"#sound-dai-cells" )) { +if (!of_property_present (dev->of_node,"#sound-dai-cells" )) {dev_info (dev,"No \"#sound-dai-cells\", no audio\n" );return 0 ; }
drivers/gpu/drm/bridge/sii902x.c +1 -1
@@ -850,7 +850,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,u8 lanes[4 ];int num_lanes, i; -if (!of_property_read_bool (dev->of_node,"#sound-dai-cells" )) { +if (!of_property_present (dev->of_node,"#sound-dai-cells" )) {dev_dbg (dev,"%s: No \"#sound-dai-cells\", no audio\n" , __func__);return 0 ;
drivers/gpu/drm/drm_panel.c +1 -1
@@ -413,7 +413,7 @@ bool drm_is_panel_follower(struct device *dev)* don't bother trying to parse it here. We just need to know if the * property is there. */ -return of_property_read_bool (dev->of_node,"panel" ); +return of_property_present (dev->of_node,"panel" ); }EXPORT_SYMBOL (drm_is_panel_follower);
drivers/gpu/drm/msm/dsi/dsi_host.c +1 -1
@@ -1831,7 +1831,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host) msm_dsi->te_source =devm_kstrdup (dev, te_source,GFP_KERNEL ); ret =0 ; -if (of_property_read_bool (np,"syscon-sfpb" )) { +if (of_property_present (np,"syscon-sfpb" )) { msm_host->sfpb =syscon_regmap_lookup_by_phandle (np,"syscon-sfpb" );if (IS_ERR (msm_host->sfpb)) {
Signature · 1 line
2.45.2
Quoted 4 lines · Rob Herring (Arm)
The use of
of_property_read_bool()for non-boolean properties is deprecated in favor ofof_property_present()when testing for property presence.
Quoted 8 lines
Signed-off-by Rob Herring (Arm) <[email protected]>--- drivers/gpu/drm/bridge/ite-it66121.c | 2 +- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/drm_panel.c | 2 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
For MSM part,
Hi Rob,
Thank you for the patch.
Quoted 5 lines · Rob Herring (Arm)
The use of
of_property_read_bool()for non-boolean properties is deprecated in favor ofof_property_present()when testing for property presence.Signed-off-by Rob Herring (Arm) <[email protected]>
Quoted 59 lines
--- drivers/gpu/drm/bridge/ite-it66121.c | 2 +- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/drm_panel.c | 2 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/bridge/ite-it66121.c +1
-1@@ -1480,7 +1480,7 @@ static int it66121_audio_codec_init(struct it66121_ctx *ctx, struct device *dev)dev_dbg (dev,"%s\n" , __func__); -if (!of_property_read_bool (dev->of_node,"#sound-dai-cells" )) { +if (!of_property_present (dev->of_node,"#sound-dai-cells" )) {dev_info (dev,"No \"#sound-dai-cells\", no audio\n" );return 0 ; }drivers/gpu/drm/bridge/sii902x.c +1
-1@@ -850,7 +850,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,u8 lanes[4 ];int num_lanes, i; -if (!of_property_read_bool (dev->of_node,"#sound-dai-cells" )) { +if (!of_property_present (dev->of_node,"#sound-dai-cells" )) {dev_dbg (dev,"%s: No \"#sound-dai-cells\", no audio\n" , __func__);return 0 ;drivers/gpu/drm/drm_panel.c +1
-1@@ -413,7 +413,7 @@ bool drm_is_panel_follower(struct device *dev)* don't bother trying to parse it here. We just need to know if the * property is there. */ -return of_property_read_bool (dev->of_node,"panel" ); +return of_property_present (dev->of_node,"panel" ); }EXPORT_SYMBOL (drm_is_panel_follower);drivers/gpu/drm/msm/dsi/dsi_host.c +1
-1@@ -1831,7 +1831,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host) msm_dsi->te_source =devm_kstrdup (dev, te_source,GFP_KERNEL ); ret =0 ; -if (of_property_read_bool (np,"syscon-sfpb" )) { +if (of_property_present (np,"syscon-sfpb" )) { msm_host->sfpb =syscon_regmap_lookup_by_phandle (np,"syscon-sfpb" );if (IS_ERR (msm_host->sfpb)) {
Signature · 3 lines
Regards, Laurent Pinchart
Hello Rob,
Quoted 5 lines · Rob Herring (Arm)
The use of
of_property_read_bool()for non-boolean properties is deprecated in favor ofof_property_present()when testing for property presence.Signed-off-by Rob Herring (Arm) <[email protected]>
Looking good to me, thanks for the patch!
Quoted 64 lines
--- drivers/gpu/drm/bridge/ite-it66121.c | 2 +- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/drm_panel.c | 2 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/bridge/ite-it66121.c +1
-1@@ -1480,7 +1480,7 @@ static int it66121_audio_codec_init(struct it66121_ctx *ctx, struct device *dev) dev_dbg(dev, "%s\n", __func__); -if (!of_property_read_bool (dev->of_node,"#sound-dai-cells" )) { +if (!of_property_present (dev->of_node,"#sound-dai-cells" )) {dev_info (dev,"No \"#sound-dai-cells\", no audio\n" );return 0 ;drivers/gpu/drm/bridge/ite-it66121.c +0
-0}drivers/gpu/drm/bridge/sii902x.c +1
-1@@ -850,7 +850,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x, u8 lanes[4];int num_lanes, i; -if (!of_property_read_bool (dev->of_node,"#sound-dai-cells" )) { +if (!of_property_present (dev->of_node,"#sound-dai-cells" )) {dev_dbg (dev,"%s: No \"#sound-dai-cells\", no audio\n" , __func__);drivers/gpu/drm/bridge/sii902x.c +0
-0return 0 ;drivers/gpu/drm/drm_panel.c +1
-1@@ -413,7 +413,7 @@ bool drm_is_panel_follower(struct device *dev)* don't bother trying to parse it here. We just need to know if the * property is there. */ -return of_property_read_bool (dev->of_node,"panel" ); +return of_property_present (dev->of_node,"panel" ); }EXPORT_SYMBOL (drm_is_panel_follower);drivers/gpu/drm/msm/dsi/dsi_host.c +1
-1@@ -1831,7 +1831,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host) msm_dsi->te_source =devm_kstrdup (dev, te_source,GFP_KERNEL ); ret =0 ; -if (of_property_read_bool (np,"syscon-sfpb" )) { +if (of_property_present (np,"syscon-sfpb" )) { msm_host->sfpb =syscon_regmap_lookup_by_phandle (np,"syscon-sfpb" );if (
IS_ERR(msm_host->sfpb)) {