]> Git Repo - linux.git/commitdiff
opp: use list_del_init instead of list_del/INIT_LIST_HEAD
authorYang Yingliang <[email protected]>
Tue, 18 May 2021 04:49:10 +0000 (12:49 +0800)
committerViresh Kumar <[email protected]>
Thu, 20 May 2021 04:02:40 +0000 (09:32 +0530)
Using list_del_init() instead of list_del() + INIT_LIST_HEAD()
to simpify the code.

Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
drivers/opp/of.c

index c582a9ca397bb4ab6f8b8344240fe5060d6bdd0e..aa75a1caf08a3b030d80f7d66769dd6e66bb8573 100644 (file)
@@ -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);
This page took 0.069653 seconds and 4 git commands to generate.