diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-03-04 23:11:24 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-03-04 23:11:24 +0100 |
commit | ed819e3b964bba8bfae8e65d4d55a3f345f8da16 (patch) | |
tree | 345c6e010750627224ac8c64ad9be06692e5e273 /kernel/power | |
parent | 48ed00031681c373ff81e78fd248710fe4cddda0 (diff) | |
parent | a9b542ee607a8afafa9447292394959fc84ea650 (diff) |
Merge branch 'pm-qos'
* pm-qos:
PM / QoS: unconditionally build the feature
PM / QoS: Simplify PM QoS expansion/merge
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/Makefile | 3 | ||||
-rw-r--r-- | kernel/power/qos.c | 23 |
2 files changed, 12 insertions, 14 deletions
diff --git a/kernel/power/Makefile b/kernel/power/Makefile index 07e0e28ffba..66d808ec525 100644 --- a/kernel/power/Makefile +++ b/kernel/power/Makefile @@ -1,7 +1,8 @@ ccflags-$(CONFIG_PM_DEBUG) := -DDEBUG -obj-$(CONFIG_PM) += main.o qos.o +obj-y += qos.o +obj-$(CONFIG_PM) += main.o obj-$(CONFIG_VT_CONSOLE_SLEEP) += console.o obj-$(CONFIG_FREEZER) += process.o obj-$(CONFIG_SUSPEND) += suspend.o diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 995e3bd3417..d6d6dbd1ecc 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c @@ -469,21 +469,18 @@ static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf, static int __init pm_qos_power_init(void) { int ret = 0; + int i; - ret = register_pm_qos_misc(&cpu_dma_pm_qos); - if (ret < 0) { - printk(KERN_ERR "pm_qos_param: cpu_dma_latency setup failed\n"); - return ret; - } - ret = register_pm_qos_misc(&network_lat_pm_qos); - if (ret < 0) { - printk(KERN_ERR "pm_qos_param: network_latency setup failed\n"); - return ret; + BUILD_BUG_ON(ARRAY_SIZE(pm_qos_array) != PM_QOS_NUM_CLASSES); + + for (i = 1; i < PM_QOS_NUM_CLASSES; i++) { + ret = register_pm_qos_misc(pm_qos_array[i]); + if (ret < 0) { + printk(KERN_ERR "pm_qos_param: %s setup failed\n", + pm_qos_array[i]->name); + return ret; + } } - ret = register_pm_qos_misc(&network_throughput_pm_qos); - if (ret < 0) - printk(KERN_ERR - "pm_qos_param: network_throughput setup failed\n"); return ret; } |