diff options
| author | Peter Korsgaard <[email protected]> | 2025-01-02 17:04:29 +0000 |
|---|---|---|
| committer | Guenter Roeck <[email protected]> | 2025-01-06 16:59:45 +0000 |
| commit | 4b0447261b21efcb888e84ec1b37cf6436981874 (patch) | |
| tree | 877a6b230369fdb45e345f4570d88e1976f5acb6 /drivers/hwmon/pwm-fan.c | |
| parent | hwmon: (lm75) add I3C support for P3T1755 (diff) | |
| download | kernel-4b0447261b21efcb888e84ec1b37cf6436981874.tar.gz kernel-4b0447261b21efcb888e84ec1b37cf6436981874.zip | |
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.
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]>
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
| -rw-r--r-- | drivers/hwmon/pwm-fan.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 53a1a968d00d..231b3b348263 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -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; |
