hwmon: (pwm-fan) Simplify enable/disable check
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Wed, 14 Sep 2022 15:31:34 +0000 (17:31 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 25 Sep 2022 21:22:10 +0000 (14:22 -0700)
commitb77f0c7680a4df2a550be5e0158204de1aa3a3ce
tree82f5c6b1cf48bb88c5131208c391f42cb50947eb
parentbf10ccad068088f4e31f4d4266356d1d24cf5734
hwmon: (pwm-fan) Simplify enable/disable check

Instead of comparing the current to the new pwm duty to decide whether to
enable the PWM, use a dedicated flag. Also apply the new PWM duty in any
case. This is a preparation to enable/disable the regulator dynamically.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20220914153137.613982-3-alexander.stein@ew.tq-group.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pwm-fan.c