diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2015-01-09 08:27:58 (GMT) |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-01-23 21:31:08 (GMT) |
commit | f90b8ad83a6ae984edb6b489ed02e45dadfd263e (patch) | |
tree | f3b756682a92783fdb0f2064dc2d3f1b3b47e0bb /drivers/base | |
parent | f5f4eda4c9b9e26ec7d7c8ce083e386016ffc0f8 (diff) | |
download | linux-f90b8ad83a6ae984edb6b489ed02e45dadfd263e.tar.xz |
PM / QoS: Use lockdep asserts to find missing hold of power.lock
Add lockdep asserts for holding the dev->power.lock to non-static
functions which require this. They could be used outside of the file so
asserts may help in detecting locking misuse.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/qos.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c index a8fe4c1..e56d538 100644 --- a/drivers/base/power/qos.c +++ b/drivers/base/power/qos.c @@ -64,6 +64,8 @@ enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev, s32 mask) struct pm_qos_flags *pqf; s32 val; + lockdep_assert_held(&dev->power.lock); + if (IS_ERR_OR_NULL(qos)) return PM_QOS_FLAGS_UNDEFINED; @@ -104,6 +106,8 @@ EXPORT_SYMBOL_GPL(dev_pm_qos_flags); */ s32 __dev_pm_qos_read_value(struct device *dev) { + lockdep_assert_held(&dev->power.lock); + return IS_ERR_OR_NULL(dev->power.qos) ? 0 : pm_qos_read_value(&dev->power.qos->resume_latency); } |