Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1718766
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 02/12] PM / devfreq: Fix locking range for making the frequency table |
| Date | 2017-08-24 03:50 +0200 |
| Message-ID | <uhPrs-8ei-41@gated-at.bofh.it> (permalink) |
| References | <uhPrr-8ei-3@gated-at.bofh.it> <uhPrs-8ei-43@gated-at.bofh.it> <uhPrr-8ei-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Even if the freq_table is included in the struct devfreq,
the commit 0ec09ac2cebe ("PM / devfreq: Set the freq_table
of devfreq device") set the frequency table outside the mutex locking.
So, this patch initializes the frequency table within the mutex locking.
Cc: stable@vger.kernel.org
Fixes: 0ec09ac2cebe ("PM / devfreq: Set the freq_table of devfreq device")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/devfreq/devfreq.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index a1c4ee818614..3c5ccb96e165 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -553,11 +553,8 @@ struct devfreq *devfreq_add_device(struct device *dev,
devfreq->data = data;
devfreq->nb.notifier_call = devfreq_notifier_call;
- if (!devfreq->profile->max_state && !devfreq->profile->freq_table) {
- mutex_unlock(&devfreq->lock);
+ if (!devfreq->profile->max_state && !devfreq->profile->freq_table)
devfreq_set_freq_table(devfreq);
- mutex_lock(&devfreq->lock);
- }
dev_set_name(&devfreq->dev, "devfreq%d",
atomic_inc_return(&devfreq_no));
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/12] PM / devfreq: Use OPP interface to handle the frequency Chanwoo Choi <cw00.choi@samsung.com> - 2017-08-24 03:50 +0200
[PATCH 02/12] PM / devfreq: Fix locking range for making the frequency table Chanwoo Choi <cw00.choi@samsung.com> - 2017-08-24 03:50 +0200
[PATCH 12/12] PM / devfreq: Add opp_notifier_cb() function pointer to support OPP notifier Chanwoo Choi <cw00.choi@samsung.com> - 2017-08-24 03:50 +0200
Re: [PATCH 12/12] PM / devfreq: Add opp_notifier_cb() function pointer to support OPP notifier Chanwoo Choi <cw00.choi@samsung.com> - 2017-08-24 06:00 +0200
[PATCH 10/12] PM / devfreq: Remove 'devfreq' prefix from helper function Chanwoo Choi <cw00.choi@samsung.com> - 2017-08-24 03:50 +0200
[PATCH 11/12] PM / devfreq: Remove exported opp_notifier function Chanwoo Choi <cw00.choi@samsung.com> - 2017-08-24 03:50 +0200
csiph-web