aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/power/qos.c1
-rw-r--r--include/linux/pm_qos.h1
-rw-r--r--kernel/power/qos.c5
3 files changed, 6 insertions, 1 deletions
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c
index 67c0f4219b02..c754e55f9dcb 100644
--- a/drivers/base/power/qos.c
+++ b/drivers/base/power/qos.c
@@ -190,6 +190,7 @@ static int dev_pm_qos_constraints_allocate(struct device *dev)
190 plist_head_init(&c->list); 190 plist_head_init(&c->list);
191 c->target_value = PM_QOS_RESUME_LATENCY_DEFAULT_VALUE; 191 c->target_value = PM_QOS_RESUME_LATENCY_DEFAULT_VALUE;
192 c->default_value = PM_QOS_RESUME_LATENCY_DEFAULT_VALUE; 192 c->default_value = PM_QOS_RESUME_LATENCY_DEFAULT_VALUE;
193 c->no_constraint_value = PM_QOS_RESUME_LATENCY_DEFAULT_VALUE;
193 c->type = PM_QOS_MIN; 194 c->type = PM_QOS_MIN;
194 c->notifiers = n; 195 c->notifiers = n;
195 196
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 88a3680ae74c..2d8ce50877d8 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -77,6 +77,7 @@ struct pm_qos_constraints {
77 struct plist_head list; 77 struct plist_head list;
78 s32 target_value; /* Do not change to 64 bit */ 78 s32 target_value; /* Do not change to 64 bit */
79 s32 default_value; 79 s32 default_value;
80 s32 no_constraint_value;
80 enum pm_qos_type type; 81 enum pm_qos_type type;
81 struct blocking_notifier_head *notifiers; 82 struct blocking_notifier_head *notifiers;
82}; 83};
diff --git a/kernel/power/qos.c b/kernel/power/qos.c
index 8dff9b48075a..e23ae38e647f 100644
--- a/kernel/power/qos.c
+++ b/kernel/power/qos.c
@@ -66,6 +66,7 @@ static struct pm_qos_constraints cpu_dma_constraints = {
66 .list = PLIST_HEAD_INIT(cpu_dma_constraints.list), 66 .list = PLIST_HEAD_INIT(cpu_dma_constraints.list),
67 .target_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE, 67 .target_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE,
68 .default_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE, 68 .default_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE,
69 .no_constraint_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE,
69 .type = PM_QOS_MIN, 70 .type = PM_QOS_MIN,
70 .notifiers = &cpu_dma_lat_notifier, 71 .notifiers = &cpu_dma_lat_notifier,
71}; 72};
@@ -79,6 +80,7 @@ static struct pm_qos_constraints network_lat_constraints = {
79 .list = PLIST_HEAD_INIT(network_lat_constraints.list), 80 .list = PLIST_HEAD_INIT(network_lat_constraints.list),
80 .target_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, 81 .target_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE,
81 .default_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, 82 .default_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE,
83 .no_constraint_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE,
82 .type = PM_QOS_MIN, 84 .type = PM_QOS_MIN,
83 .notifiers = &network_lat_notifier, 85 .notifiers = &network_lat_notifier,
84}; 86};
@@ -93,6 +95,7 @@ static struct pm_qos_constraints network_tput_constraints = {
93 .list = PLIST_HEAD_INIT(network_tput_constraints.list), 95 .list = PLIST_HEAD_INIT(network_tput_constraints.list),
94 .target_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, 96 .target_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE,
95 .default_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, 97 .default_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE,
98 .no_constraint_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE,
96 .type = PM_QOS_MAX, 99 .type = PM_QOS_MAX,
97 .notifiers = &network_throughput_notifier, 100 .notifiers = &network_throughput_notifier,
98}; 101};
@@ -128,7 +131,7 @@ static const struct file_operations pm_qos_power_fops = {
128static inline int pm_qos_get_value(struct pm_qos_constraints *c) 131static inline int pm_qos_get_value(struct pm_qos_constraints *c)
129{ 132{
130 if (plist_head_empty(&c->list)) 133 if (plist_head_empty(&c->list))
131 return c->default_value; 134 return c->no_constraint_value;
132 135
133 switch (c->type) { 136 switch (c->type) {
134 case PM_QOS_MIN: 137 case PM_QOS_MIN: