summary refs log tree commit diff
path: root/drivers/opp/opp.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2018-08-03 07:05:21 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2018-09-19 14:56:40 -0700
commit3d2556992a878a2210d3be498416aee39e0c32aa (patch)
tree76f9566a83f216de277434d5613efdb059f2210d /drivers/opp/opp.h
parent404b1369ea26f598b96ae4d3183262a879703cfe (diff)
downloadlinux-3d2556992a878a2210d3be498416aee39e0c32aa.tar.gz
OPP: Protect dev_list with opp_table lock
The dev_list needs to be protected with a lock, else we may have
simultaneous access (addition/removal) to it and that would be racy.
Extend scope of the opp_table lock to protect dev_list as well.

Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/opp.h')
-rw-r--r--drivers/opp/opp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h
index a9d22aa534c3..88e9f47aadf1 100644
--- a/drivers/opp/opp.h
+++ b/drivers/opp/opp.h
@@ -126,7 +126,7 @@ enum opp_table_access {
  * @dev_list:	list of devices that share these OPPs
  * @opp_list:	table of opps
  * @kref:	for reference count of the table.
- * @lock:	mutex protecting the opp_list.
+ * @lock:	mutex protecting the opp_list and dev_list.
  * @np:		struct device_node pointer for opp's DT node.
  * @clock_latency_ns_max: Max clock latency in nanoseconds.
  * @shared_opp: OPP is shared between multiple devices.