kernel/0216-Update-pwm_apply_state-to-pwm_apply_might_sleep.patch
2024-12-19 16:34:44 -05:00

44 lines
1.4 KiB
Diff

From ccb2da8b8522ab70ec44f4ac464fe84c8863005e Mon Sep 17 00:00:00 2001
From: Jason Montleon <jmontleo@redhat.com>
Date: Mon, 2 Dec 2024 14:26:06 -0500
Subject: [PATCH 216/219] Update pwm_apply_state to pwm_apply_might_sleep
---
drivers/hwmon/eswin-fan-control.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/eswin-fan-control.c b/drivers/hwmon/eswin-fan-control.c
index cc931a861159..076672e123e0 100644
--- a/drivers/hwmon/eswin-fan-control.c
+++ b/drivers/hwmon/eswin-fan-control.c
@@ -139,7 +139,7 @@ static ssize_t eswin_fan_pwm_ctl_store(struct device *dev, struct device_attribu
dev_err(dev, "get error attr index 0x%x\n", attr->index);
}
- pwm_apply_state(ctl->pwm, &state);
+ pwm_apply_might_sleep(ctl->pwm, &state);
return count;
}
@@ -240,7 +240,7 @@ static int eswin_fan_control_set_pwm_duty(const long val, struct eswin_fan_contr
pwm_get_state(ctl->pwm, &state);
pwm_set_relative_duty_cycle(&state, val, 100);
- pwm_apply_state(ctl->pwm, &state);
+ pwm_apply_might_sleep(ctl->pwm, &state);
return 0;
}
@@ -525,7 +525,7 @@ static int eswin_fan_control_probe(struct platform_device *pdev)
}
dev_err(&pdev->dev, "state.period: %lld state.duty_cycle: %lld\n",
state.period,state.duty_cycle);
- ret = pwm_apply_state(ctl->pwm, &state);
+ ret = pwm_apply_might_sleep(ctl->pwm, &state);
if (ret) {
dev_err(&pdev->dev, "failed to apply initial PWM state: %d\n",
ret);
--
2.47.0