diff options
| -rw-r--r-- | drivers/base/power/opp/core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c index a8cc14fd8ae4..a6de32530693 100644 --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c | |||
| @@ -1581,6 +1581,9 @@ static int _opp_set_availability(struct device *dev, unsigned long freq, | |||
| 1581 | 1581 | ||
| 1582 | opp->available = availability_req; | 1582 | opp->available = availability_req; |
| 1583 | 1583 | ||
| 1584 | dev_pm_opp_get(opp); | ||
| 1585 | mutex_unlock(&opp_table->lock); | ||
| 1586 | |||
| 1584 | /* Notify the change of the OPP availability */ | 1587 | /* Notify the change of the OPP availability */ |
| 1585 | if (availability_req) | 1588 | if (availability_req) |
| 1586 | blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_ENABLE, | 1589 | blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_ENABLE, |
| @@ -1589,8 +1592,12 @@ static int _opp_set_availability(struct device *dev, unsigned long freq, | |||
| 1589 | blocking_notifier_call_chain(&opp_table->head, | 1592 | blocking_notifier_call_chain(&opp_table->head, |
| 1590 | OPP_EVENT_DISABLE, opp); | 1593 | OPP_EVENT_DISABLE, opp); |
| 1591 | 1594 | ||
| 1595 | dev_pm_opp_put(opp); | ||
| 1596 | goto put_table; | ||
| 1597 | |||
| 1592 | unlock: | 1598 | unlock: |
| 1593 | mutex_unlock(&opp_table->lock); | 1599 | mutex_unlock(&opp_table->lock); |
| 1600 | put_table: | ||
| 1594 | dev_pm_opp_put_opp_table(opp_table); | 1601 | dev_pm_opp_put_opp_table(opp_table); |
| 1595 | return r; | 1602 | return r; |
| 1596 | } | 1603 | } |
