aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-02 08:10:09 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-02 08:10:09 -0400
commit436ede8942ab43474182c6454f420d71f7bb1163 (patch)
treec4cbda081690af54b70f1f76aebb42f8be44754f /drivers/base/power
parent9eaee2cdcf9ead20f234b15ed26f82a96a4fa8fb (diff)
PM / QoS: Document request manipulation requirement for flags
In fact, the callers of dev_pm_qos_add_request(), dev_pm_qos_update_request() and dev_pm_qos_remove_request() for requests of type DEV_PM_QOS_FLAGS need to ensure that the target device is not RPM_SUSPENDED before using any of these functions (or be prepared for the new PM QoS flags to take effect after the device has been resumed). Document this in their kerneldoc comments. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power')
-rw-r--r--drivers/base/power/qos.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c
index 31d3f4842b9b..081db2d25daa 100644
--- a/drivers/base/power/qos.c
+++ b/drivers/base/power/qos.c
@@ -277,6 +277,9 @@ void dev_pm_qos_constraints_destroy(struct device *dev)
277 * -EINVAL in case of wrong parameters, -ENOMEM if there's not enough memory 277 * -EINVAL in case of wrong parameters, -ENOMEM if there's not enough memory
278 * to allocate for data structures, -ENODEV if the device has just been removed 278 * to allocate for data structures, -ENODEV if the device has just been removed
279 * from the system. 279 * from the system.
280 *
281 * Callers should ensure that the target device is not RPM_SUSPENDED before
282 * using this function for requests of type DEV_PM_QOS_FLAGS.
280 */ 283 */
281int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req, 284int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
282 enum dev_pm_qos_req_type type, s32 value) 285 enum dev_pm_qos_req_type type, s32 value)
@@ -367,6 +370,9 @@ static int __dev_pm_qos_update_request(struct dev_pm_qos_request *req,
367 * 0 if the aggregated constraint value has not changed, 370 * 0 if the aggregated constraint value has not changed,
368 * -EINVAL in case of wrong parameters, -ENODEV if the device has been 371 * -EINVAL in case of wrong parameters, -ENODEV if the device has been
369 * removed from the system 372 * removed from the system
373 *
374 * Callers should ensure that the target device is not RPM_SUSPENDED before
375 * using this function for requests of type DEV_PM_QOS_FLAGS.
370 */ 376 */
371int dev_pm_qos_update_request(struct dev_pm_qos_request *req, s32 new_value) 377int dev_pm_qos_update_request(struct dev_pm_qos_request *req, s32 new_value)
372{ 378{
@@ -398,6 +404,9 @@ EXPORT_SYMBOL_GPL(dev_pm_qos_update_request);
398 * 0 if the aggregated constraint value has not changed, 404 * 0 if the aggregated constraint value has not changed,
399 * -EINVAL in case of wrong parameters, -ENODEV if the device has been 405 * -EINVAL in case of wrong parameters, -ENODEV if the device has been
400 * removed from the system 406 * removed from the system
407 *
408 * Callers should ensure that the target device is not RPM_SUSPENDED before
409 * using this function for requests of type DEV_PM_QOS_FLAGS.
401 */ 410 */
402int dev_pm_qos_remove_request(struct dev_pm_qos_request *req) 411int dev_pm_qos_remove_request(struct dev_pm_qos_request *req)
403{ 412{