Skip to content

Commit 4b04472

Browse files
jacmetgroeck
authored andcommitted
hwmon: (pwm-fan): Make use of device properties everywhere
Commit 255ab27 ("hwmon: (pwm-fan) Introduce start from stopped state handling") added two of_property_read_u32() calls after the driver was reworked to use device_property_* in commit dfd977d ("hwmon: (pwm-fan) Make use of device properties"), so convert those as well. Signed-off-by: Peter Korsgaard <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 6071d10 commit 4b04472

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/hwmon/pwm-fan.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,16 +638,16 @@ static int pwm_fan_probe(struct platform_device *pdev)
638638
channels[1] = &ctx->fan_channel;
639639
}
640640

641-
ret = of_property_read_u32(dev->of_node, "fan-stop-to-start-percent",
642-
&pwm_min_from_stopped);
641+
ret = device_property_read_u32(dev, "fan-stop-to-start-percent",
642+
&pwm_min_from_stopped);
643643
if (!ret && pwm_min_from_stopped) {
644644
ctx->pwm_duty_cycle_from_stopped =
645645
DIV_ROUND_UP_ULL(pwm_min_from_stopped *
646646
(ctx->pwm_state.period - 1),
647647
100);
648648
}
649-
ret = of_property_read_u32(dev->of_node, "fan-stop-to-start-us",
650-
&ctx->pwm_usec_from_stopped);
649+
ret = device_property_read_u32(dev, "fan-stop-to-start-us",
650+
&ctx->pwm_usec_from_stopped);
651651
if (ret)
652652
ctx->pwm_usec_from_stopped = 250000;
653653

0 commit comments

Comments
 (0)