mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 17:12:50 -04:00
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>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
54de61a3f6
commit
6acae3c833
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user