summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2012-01-29 20:39:25 +0100
committerRafael J. Wysocki <rjw@sisk.pl>2012-01-29 20:39:25 +0100
commitd031e1de2c5ba91e67ed83f6adf624543ab2b03d (patch)
tree2d8b2c052c920d1973e6b1e00cbd95502bd9c0e0 /include/linux
parent0496c8ae366724a0a2136cec09a2e277e782c126 (diff)
PM / QoS: Simplify PM QoS expansion/merge
- Replace class ID #define with enumeration - Loop through PM QoS objects during initialization (rather than initializing them one-by-one) Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-by: Antti Miettinen <amiettinen@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Acked-by: markgross <markgross@thegnar.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pm_qos.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index e5bbcbaa6f57..5ac91d8e69de 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -9,12 +9,16 @@
#include <linux/miscdevice.h>
#include <linux/device.h>
-#define PM_QOS_RESERVED 0
-#define PM_QOS_CPU_DMA_LATENCY 1
-#define PM_QOS_NETWORK_LATENCY 2
-#define PM_QOS_NETWORK_THROUGHPUT 3
+enum {
+ PM_QOS_RESERVED = 0,
+ PM_QOS_CPU_DMA_LATENCY,
+ PM_QOS_NETWORK_LATENCY,
+ PM_QOS_NETWORK_THROUGHPUT,
+
+ /* insert new class ID */
+ PM_QOS_NUM_CLASSES,
+};
-#define PM_QOS_NUM_CLASSES 4
#define PM_QOS_DEFAULT_VALUE -1
#define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC)