diff options
Diffstat (limited to 'drivers/base/power/opp/of.c')
| -rw-r--r-- | drivers/base/power/opp/of.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/base/power/opp/of.c b/drivers/base/power/opp/of.c index 1dfd3dd92624..5552211e6fcd 100644 --- a/drivers/base/power/opp/of.c +++ b/drivers/base/power/opp/of.c | |||
| @@ -71,8 +71,18 @@ static bool _opp_is_supported(struct device *dev, struct opp_table *opp_table, | |||
| 71 | u32 version; | 71 | u32 version; |
| 72 | int ret; | 72 | int ret; |
| 73 | 73 | ||
| 74 | if (!opp_table->supported_hw) | 74 | if (!opp_table->supported_hw) { |
| 75 | return true; | 75 | /* |
| 76 | * In the case that no supported_hw has been set by the | ||
| 77 | * platform but there is an opp-supported-hw value set for | ||
| 78 | * an OPP then the OPP should not be enabled as there is | ||
| 79 | * no way to see if the hardware supports it. | ||
| 80 | */ | ||
| 81 | if (of_find_property(np, "opp-supported-hw", NULL)) | ||
| 82 | return false; | ||
| 83 | else | ||
| 84 | return true; | ||
| 85 | } | ||
| 76 | 86 | ||
| 77 | while (count--) { | 87 | while (count--) { |
| 78 | ret = of_property_read_u32_index(np, "opp-supported-hw", count, | 88 | ret = of_property_read_u32_index(np, "opp-supported-hw", count, |
