diff options
| author | Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com> | 2026-02-19 21:15:55 +0300 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-03-06 21:18:28 +0300 |
| commit | 6acae3c8332f3125e331f2d896bef994d4460376 (patch) | |
| tree | 81f8eeebc9e78b4457240453715c40ba2f021134 | |
| parent | 54de61a3f6894556364e2164602c7eaa943581be (diff) | |
| download | linux-6acae3c8332f3125e331f2d896bef994d4460376.tar.xz | |
cpufreq: intel_pstate: Allow repeated intel_pstate disable
Repeated intel_pstate disables currently return an error, adding unnecessary
complexity to userspace scripts which must first read the current state and
conditionally write 'off'.
Make repeated intel_pstate disables a no-op.
Signed-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20260219181600.16388-1-fabio.m.de.francesco@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| -rw-r--r-- | drivers/cpufreq/intel_pstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 11c58af41900..51938c5a47ca 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -3472,7 +3472,7 @@ static int intel_pstate_update_status(const char *buf, size_t size) { if (size == 3 && !strncmp(buf, "off", size)) { if (!intel_pstate_driver) - return -EINVAL; + return 0; if (hwp_active) return -EBUSY; |
