diff options
| author | 2022-11-05 16:02:42 +0100 | |
|---|---|---|
| committer | 2022-11-05 16:08:36 +0100 | |
| commit | 8e4e4c2f53ffcb0ef746dc3b87ce1a57c5c94c7d (patch) | |
| tree | a61fbc998223d50f8b8691b9b9ced38c21072b10 /drivers/hwmon/pwm-fan.c | |
| parent | drm/ofdrm: Cast error pointers to void __iomem * (diff) | |
| parent | Merge tag 'drm-intel-gt-next-2022-11-03' of git://anongit.freedesktop.org/drm/drm-intel into drm-next (diff) | |
| download | wireguard-linux-8e4e4c2f53ffcb0ef746dc3b87ce1a57c5c94c7d.tar.xz wireguard-linux-8e4e4c2f53ffcb0ef746dc3b87ce1a57c5c94c7d.zip | |
Merge drm/drm-next into drm-misc-next
Backmerging drm/drm-next to get the latest changes in the xlnx driver.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
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); |
