From 59d911a505247e40296c4558b5a5b38d378d808e Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Fri, 18 Jan 2013 19:52:34 +0000 Subject: [PATCH] --- yaml --- r: 349081 b: refs/heads/master c: bcb27549f4185ca7d0168e201931613706ef2b83 h: refs/heads/master i: 349079: cb9b777e45c73856d3ddbec8bf03071b058677f7 v: v3 --- [refs] | 2 +- trunk/drivers/devfreq/devfreq.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 997f93800e9c..c0d2a0b1e6df 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 78e8eb8feab7d85f4cc215afe1457a228bf4eed9 +refs/heads/master: bcb27549f4185ca7d0168e201931613706ef2b83 diff --git a/trunk/drivers/devfreq/devfreq.c b/trunk/drivers/devfreq/devfreq.c index 53766f39aadd..3b367973a802 100644 --- a/trunk/drivers/devfreq/devfreq.c +++ b/trunk/drivers/devfreq/devfreq.c @@ -994,6 +994,11 @@ module_exit(devfreq_exit); * @freq: The frequency given to target function * @flags: Flags handed from devfreq framework. * + * Locking: This function must be called under rcu_read_lock(). opp is a rcu + * protected pointer. The reason for the same is that the opp pointer which is + * returned will remain valid for use with opp_get_{voltage, freq} only while + * under the locked area. The pointer returned must be used prior to unlocking + * with rcu_read_unlock() to maintain the integrity of the pointer. */ struct opp *devfreq_recommended_opp(struct device *dev, unsigned long *freq, u32 flags)