From 546bfe22844d461f838a2ec093f7d97e7bacff15 Mon Sep 17 00:00:00 2001 From: Alex Frid Date: Thu, 15 Dec 2011 13:34:45 -0800 Subject: 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) Change-Id: I185b700b52c752c62e7550fe739adc498fc989ef Signed-off-by: Alex Frid Reviewed-on: http://git-master/r/70603 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Antti Miettinen Reviewed-by: Diwakar Tundlam Reviewed-by: Scott Williams Reviewed-by: Yu-Huan Hsu --- include/linux/pm_qos_params.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'include/linux/pm_qos_params.h') diff --git a/include/linux/pm_qos_params.h b/include/linux/pm_qos_params.h index a7d87f911cab..c1f1775b317f 100644 --- a/include/linux/pm_qos_params.h +++ b/include/linux/pm_qos_params.h @@ -8,12 +8,17 @@ #include #include -#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) -- cgit v1.2.3