blob: 1fd4ba8ba891d5b6d3e66028aa4ad38152caf581 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
From 802f30fc5aa94554783bdaea835a31214a37802c Mon Sep 17 00:00:00 2001
From: Andy Lutomirski <luto@kernel.org>
Date: Mon, 31 Oct 2016 09:13:47 -0700
Subject: dev_pm_qos: Fix writing 'auto' to pm_qos_latency_tolerance_us
If it was already 'auto', then writing 'auto' again would
incorrectly fail.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
drivers/base/power/qos.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c
index 7f3646e..6a1f2c7 100644
--- a/drivers/base/power/qos.c
+++ b/drivers/base/power/qos.c
@@ -856,7 +856,10 @@ int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val)
struct dev_pm_qos_request *req;
if (val < 0) {
- ret = -EINVAL;
+ if (val == PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT)
+ ret = 0;
+ else
+ ret = -EINVAL;
goto out;
}
req = kzalloc(sizeof(*req), GFP_KERNEL);
--
cgit v0.12
|