Skip to content

Commit 74c269f

Browse files
JuliaLawallScott Wood
authored andcommitted
fsl/qe: use of_property_read_bool
Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Scott Wood <[email protected]>
1 parent 7120438 commit 74c269f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/fsl/qe/qe_tdm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ int ucc_of_parse_tdm(struct device_node *np, struct ucc_tdm *utdm,
9999
utdm->tdm_port = val;
100100
ut_info->uf_info.tdm_num = utdm->tdm_port;
101101

102-
if (of_get_property(np, "fsl,tdm-internal-loopback", NULL))
102+
if (of_property_read_bool(np, "fsl,tdm-internal-loopback"))
103103
utdm->tdm_mode = TDM_INTERNAL_LOOPBACK;
104104
else
105105
utdm->tdm_mode = TDM_NORMAL;

0 commit comments

Comments
 (0)