diff options
Diffstat (limited to 'drivers/base/power/opp/of.c')
-rw-r--r-- | drivers/base/power/opp/of.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/base/power/opp/of.c b/drivers/base/power/opp/of.c index 94d2010558e3..1dfd3dd92624 100644 --- a/drivers/base/power/opp/of.c +++ b/drivers/base/power/opp/of.c | |||
@@ -34,7 +34,10 @@ static struct opp_table *_managed_opp(const struct device_node *np) | |||
34 | * But the OPPs will be considered as shared only if the | 34 | * But the OPPs will be considered as shared only if the |
35 | * OPP table contains a "opp-shared" property. | 35 | * OPP table contains a "opp-shared" property. |
36 | */ | 36 | */ |
37 | return opp_table->shared_opp ? opp_table : NULL; | 37 | if (opp_table->shared_opp == OPP_TABLE_ACCESS_SHARED) |
38 | return opp_table; | ||
39 | |||
40 | return NULL; | ||
38 | } | 41 | } |
39 | } | 42 | } |
40 | 43 | ||
@@ -353,7 +356,10 @@ static int _of_add_opp_table_v2(struct device *dev, struct device_node *opp_np) | |||
353 | } | 356 | } |
354 | 357 | ||
355 | opp_table->np = opp_np; | 358 | opp_table->np = opp_np; |
356 | opp_table->shared_opp = of_property_read_bool(opp_np, "opp-shared"); | 359 | if (of_property_read_bool(opp_np, "opp-shared")) |
360 | opp_table->shared_opp = OPP_TABLE_ACCESS_SHARED; | ||
361 | else | ||
362 | opp_table->shared_opp = OPP_TABLE_ACCESS_EXCLUSIVE; | ||
357 | 363 | ||
358 | mutex_unlock(&opp_table_lock); | 364 | mutex_unlock(&opp_table_lock); |
359 | 365 | ||