diff options
author | 2022-12-22 09:11:48 +0100 | |
---|---|---|
committer | 2022-12-22 09:11:48 +0100 | |
commit | 2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b (patch) | |
tree | f711bc9cab45f4963e4883ef15ff4c54a6cbc12e /drivers/hwmon/pwm-fan.c | |
parent | Merge tag 'asoc-fix-v6.1-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus (diff) | |
parent | ALSA: hda/hdmi: fix stream-id config keep-alive for rt suspend (diff) | |
download | wireguard-linux-2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b.tar.xz wireguard-linux-2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b.zip |
Merge branch 'for-next' into for-linus
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
-rw-r--r-- | drivers/hwmon/pwm-fan.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index dc3d9a22d917..83a347ca35da 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -257,7 +257,10 @@ static int pwm_fan_update_enable(struct pwm_fan_ctx *ctx, long val) if (val == 0) { /* Disable pwm-fan unconditionally */ - ret = __set_pwm(ctx, 0); + if (ctx->enabled) + ret = __set_pwm(ctx, 0); + else + ret = pwm_fan_switch_power(ctx, false); if (ret) ctx->enable_mode = old_val; pwm_fan_update_state(ctx, 0); |