Skip to contentSkip to conversation

hwmon: (pwm-fan): Make use of device properties everywhere

PATCH Applied Peter Korsgaard 3 participants 3 messages Jan 2, 2025 – Jan 6, 2025 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (pwm-fan): Make use of device properties everywhere

Commit 255ab27a0743 ("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 dfd977d85b15 ("hwmon: (pwm-fan) Make use of device properties"), so convert those as well.

---
 drivers/hwmon/pwm-fan.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/hwmon/pwm-fan.c +4 -4
index 53a1a968d00d..231b3b348263 100644
@@ -638,16 +638,16 @@ static int pwm_fan_probe(struct platform_device *pdev)
 		channels[1] = &ctx->fan_channel;
 	}
 
-	ret = of_property_read_u32(dev->of_node, "fan-stop-to-start-percent",
-				   &pwm_min_from_stopped);
+	ret = device_property_read_u32(dev, "fan-stop-to-start-percent",
+				       &pwm_min_from_stopped);
 	if (!ret && pwm_min_from_stopped) {
 		ctx->pwm_duty_cycle_from_stopped =
 			DIV_ROUND_UP_ULL(pwm_min_from_stopped *
 					 (ctx->pwm_state.period - 1),
 					 100);
 	}
-	ret = of_property_read_u32(dev->of_node, "fan-stop-to-start-us",
-				   &ctx->pwm_usec_from_stopped);
+	ret = device_property_read_u32(dev, "fan-stop-to-start-us",
+				       &ctx->pwm_usec_from_stopped);
 	if (ret)
 		ctx->pwm_usec_from_stopped = 250000;
 
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Peter Korsgaard

Commit 255ab27a0743 ("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 dfd977d85b15 ("hwmon: (pwm-fan) Make use of device properties"), so convert those as well.

Thanks

maintainer Applied
#2 lore raw
In reply to Peter Korsgaard
Quoted 7 lines · Peter Korsgaard

Commit 255ab27a0743 ("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 dfd977d85b15 ("hwmon: (pwm-fan) Make use of device properties"), so convert those as well.

Applied.

Thanks,
Guenter