mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-04 04:04:19 +00:00
Merge branches 'pm-sleep' and 'pm-qos'
Merge a PM QoS fix and a hibernation fix for 6.5-rc2. - Unbreak the /sys/power/resume interface after recent changes (Azat Khuzhin). - Allow PM_QOS_DEFAULT_VALUE to be used with frequency QoS (Chungkai Yang). * pm-sleep: PM: hibernate: Fix writing maj:min to /sys/power/resume * pm-qos: PM: QoS: Restore support for default value on frequency QoS
This commit is contained in:
commit
d121758da6
@ -1179,6 +1179,7 @@ static ssize_t resume_store(struct kobject *kobj, struct kobj_attribute *attr,
|
|||||||
unsigned maj, min, offset;
|
unsigned maj, min, offset;
|
||||||
char *p, dummy;
|
char *p, dummy;
|
||||||
|
|
||||||
|
error = 0;
|
||||||
if (sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2 ||
|
if (sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2 ||
|
||||||
sscanf(name, "%u:%u:%u:%c", &maj, &min, &offset,
|
sscanf(name, "%u:%u:%u:%c", &maj, &min, &offset,
|
||||||
&dummy) == 3) {
|
&dummy) == 3) {
|
||||||
|
@ -426,6 +426,11 @@ late_initcall(cpu_latency_qos_init);
|
|||||||
|
|
||||||
/* Definitions related to the frequency QoS below. */
|
/* Definitions related to the frequency QoS below. */
|
||||||
|
|
||||||
|
static inline bool freq_qos_value_invalid(s32 value)
|
||||||
|
{
|
||||||
|
return value < 0 && value != PM_QOS_DEFAULT_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* freq_constraints_init - Initialize frequency QoS constraints.
|
* freq_constraints_init - Initialize frequency QoS constraints.
|
||||||
* @qos: Frequency QoS constraints to initialize.
|
* @qos: Frequency QoS constraints to initialize.
|
||||||
@ -531,7 +536,7 @@ int freq_qos_add_request(struct freq_constraints *qos,
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (IS_ERR_OR_NULL(qos) || !req || value < 0)
|
if (IS_ERR_OR_NULL(qos) || !req || freq_qos_value_invalid(value))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (WARN(freq_qos_request_active(req),
|
if (WARN(freq_qos_request_active(req),
|
||||||
@ -563,7 +568,7 @@ EXPORT_SYMBOL_GPL(freq_qos_add_request);
|
|||||||
*/
|
*/
|
||||||
int freq_qos_update_request(struct freq_qos_request *req, s32 new_value)
|
int freq_qos_update_request(struct freq_qos_request *req, s32 new_value)
|
||||||
{
|
{
|
||||||
if (!req || new_value < 0)
|
if (!req || freq_qos_value_invalid(new_value))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (WARN(!freq_qos_request_active(req),
|
if (WARN(!freq_qos_request_active(req),
|
||||||
|
Loading…
Reference in New Issue
Block a user