diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-05-18 12:49:10 +0800 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2021-05-20 09:32:40 +0530 |
commit | ac9fd3c8034011cc10a4c161b70a5837d95203f6 (patch) | |
tree | 72d2122a834b876a122391c0cd0993b5eb8a3c27 /drivers/opp | |
parent | 6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff) |
opp: use list_del_init instead of list_del/INIT_LIST_HEAD
Using list_del_init() instead of list_del() + INIT_LIST_HEAD()
to simpify the code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp')
-rw-r--r-- | drivers/opp/of.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c index c582a9ca397b..aa75a1caf08a 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -433,8 +433,7 @@ static void lazy_link_required_opp_table(struct opp_table *new_table) /* All required opp-tables found, remove from lazy list */ if (!lazy) { - list_del(&opp_table->lazy); - INIT_LIST_HEAD(&opp_table->lazy); + list_del_init(&opp_table->lazy); list_for_each_entry(opp, &opp_table->opp_list, node) _required_opps_available(opp, opp_table->required_opp_count); |