lkml.org 
[lkml]   [2019]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/4] PM / devfreq: reuse system workqueue machanism
Date
There is no need for creating another workqueue, it is enough
to reuse system_freezable_power_efficient one.

Signed-off-by: Kamil Konieczny <k.konieczny@samsung.com>
---
drivers/devfreq/devfreq.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 46a7ff7c2994..955949c6fc1f 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -1532,11 +1532,11 @@ static int __init devfreq_init(void)
return PTR_ERR(devfreq_class);
}

- devfreq_wq = create_freezable_workqueue("devfreq_wq");
+ devfreq_wq = system_freezable_power_efficient_wq;
if (!devfreq_wq) {
class_destroy(devfreq_class);
- pr_err("%s: couldn't create workqueue\n", __FILE__);
- return -ENOMEM;
+ pr_err("%s: system_freezable_power_efficient_wq isn't initialized\n", __FILE__);
+ return -EINVAL;
}
devfreq_class->dev_groups = devfreq_groups;

--
2.24.0
\
 
 \ /
  Last update: 2019-12-09 15:46    [W:0.113 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site