Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 362134b1 authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Patrick Daly
Browse files

qcom: msm-clock-controller: Remove incorrect usage of_property_read_bool



of_property_read_bool is really only meant to check if
a boolean property has been set. Although its implementation
has been simplified to just check for the existence of
the property, it is meant to be used only when the property
in question is actually a boolean. Furthermore, one cannot
guarantee that the underlying implementation will remain
the same forever. To check if a property exists, use the
of_find_property API.

Change-Id: I2f1c60bd9389b29f251b267c36e5d07eddf749f4
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent c5bc590f
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ static int generic_clk_parse_parents(struct device *dev, struct clk *c,
	char *name = "qcom,parent";

	/* This property is optional */
	if (!of_property_read_bool(np, name))
	if (!of_find_property(np, name, NULL))
		return 0;

	rc = of_property_read_phandle_index(np, name, 0, &p);
@@ -231,7 +231,7 @@ static int generic_clk_parse_vdd(struct device *dev, struct clk *c,
	char *name = "qcom,supply-group";

	/* This property is optional */
	if (!of_property_read_bool(np, name))
	if (!of_find_property(np, name, NULL))
		return 0;

	rc = of_property_read_phandle_index(np, name, 0, &p);
@@ -256,7 +256,7 @@ static int generic_clk_parse_flags(struct device *dev, struct clk *c,
	char *name = "qcom,clk-flags";

	/* This property is optional */
	if (!of_property_read_bool(np, name))
	if (!of_find_property(np, name, NULL))
		return 0;

	rc = of_property_read_u32(np, name, &c->flags);
@@ -352,7 +352,7 @@ static int generic_clk_parse_depends(struct device *dev, struct clk *c,
	char *name = "qcom,depends";

	/* This property is optional */
	if (!of_property_read_bool(np, name))
	if (!of_find_property(np, name, NULL))
		return 0;

	rc = of_property_read_phandle_index(np, name, 0, &p);
@@ -378,7 +378,7 @@ static int generic_clk_parse_init_config(struct device *dev, struct clk *c,
	char *name = "qcom,config-rate";

	/* This property is optional */
	if (!of_property_read_bool(np, name))
	if (!of_find_property(np, name, NULL))
		return 0;

	rc = of_property_read_u32(np, name, &temp);