Skip to content

Commit 5d95e3c

Browse files
committed
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. Signed-off-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Dragan Simic <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rob Herring <[email protected]>
1 parent 0ab6ea2 commit 5d95e3c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/gpu/drm/bridge/ite-it66121.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ static int it66121_audio_codec_init(struct it66121_ctx *ctx, struct device *dev)
14801480

14811481
dev_dbg(dev, "%s\n", __func__);
14821482

1483-
if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
1483+
if (!of_property_present(dev->of_node, "#sound-dai-cells")) {
14841484
dev_info(dev, "No \"#sound-dai-cells\", no audio\n");
14851485
return 0;
14861486
}

drivers/gpu/drm/bridge/sii902x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
867867
u8 lanes[4];
868868
int num_lanes, i;
869869

870-
if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
870+
if (!of_property_present(dev->of_node, "#sound-dai-cells")) {
871871
dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
872872
__func__);
873873
return 0;

drivers/gpu/drm/drm_panel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ bool drm_is_panel_follower(struct device *dev)
414414
* don't bother trying to parse it here. We just need to know if the
415415
* property is there.
416416
*/
417-
return of_property_read_bool(dev->of_node, "panel");
417+
return of_property_present(dev->of_node, "panel");
418418
}
419419
EXPORT_SYMBOL(drm_is_panel_follower);
420420

drivers/gpu/drm/msm/dsi/dsi_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1831,7 +1831,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host)
18311831
msm_dsi->te_source = devm_kstrdup(dev, te_source, GFP_KERNEL);
18321832
ret = 0;
18331833

1834-
if (of_property_read_bool(np, "syscon-sfpb")) {
1834+
if (of_property_present(np, "syscon-sfpb")) {
18351835
msm_host->sfpb = syscon_regmap_lookup_by_phandle(np,
18361836
"syscon-sfpb");
18371837
if (IS_ERR(msm_host->sfpb)) {

0 commit comments

Comments
 (0)