Skip to content

Commit 175c9df

Browse files
robherringrafaeljw
authored andcommitted
cpufreq: pmac32: Use of_property_read_bool() for boolean properties
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 8ffdb1f commit 175c9df

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/cpufreq/pmac32-cpufreq.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ static int pmac_cpufreq_init_7447A(struct device_node *cpunode)
546546
{
547547
struct device_node *volt_gpio_np;
548548

549-
if (of_get_property(cpunode, "dynamic-power-step", NULL) == NULL)
549+
if (!of_property_read_bool(cpunode, "dynamic-power-step"))
550550
return 1;
551551

552552
volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select");
@@ -576,7 +576,7 @@ static int pmac_cpufreq_init_750FX(struct device_node *cpunode)
576576
u32 pvr;
577577
const u32 *value;
578578

579-
if (of_get_property(cpunode, "dynamic-power-step", NULL) == NULL)
579+
if (!of_property_read_bool(cpunode, "dynamic-power-step"))
580580
return 1;
581581

582582
hi_freq = cur_freq;
@@ -632,7 +632,7 @@ static int __init pmac_cpufreq_setup(void)
632632

633633
/* Check for 7447A based MacRISC3 */
634634
if (of_machine_is_compatible("MacRISC3") &&
635-
of_get_property(cpunode, "dynamic-power-step", NULL) &&
635+
of_property_read_bool(cpunode, "dynamic-power-step") &&
636636
PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
637637
pmac_cpufreq_init_7447A(cpunode);
638638

0 commit comments

Comments
 (0)