@@ -935,39 +935,41 @@ static int clk_core_enable_lock(struct clk_core *core)
935
935
*/
936
936
void clk_gate_restore_context (struct clk_hw * hw )
937
937
{
938
- if (hw -> clk -> core -> enable_count )
939
- hw -> clk -> core -> ops -> enable (hw );
938
+ struct clk_core * core = hw -> core ;
939
+
940
+ if (core -> enable_count )
941
+ core -> ops -> enable (hw );
940
942
else
941
- hw -> clk -> core -> ops -> disable (hw );
943
+ core -> ops -> disable (hw );
942
944
}
943
945
EXPORT_SYMBOL_GPL (clk_gate_restore_context );
944
946
945
- static int _clk_save_context (struct clk_core * clk )
947
+ static int clk_core_save_context (struct clk_core * core )
946
948
{
947
949
struct clk_core * child ;
948
950
int ret = 0 ;
949
951
950
- hlist_for_each_entry (child , & clk -> children , child_node ) {
951
- ret = _clk_save_context (child );
952
+ hlist_for_each_entry (child , & core -> children , child_node ) {
953
+ ret = clk_core_save_context (child );
952
954
if (ret < 0 )
953
955
return ret ;
954
956
}
955
957
956
- if (clk -> ops && clk -> ops -> save_context )
957
- ret = clk -> ops -> save_context (clk -> hw );
958
+ if (core -> ops && core -> ops -> save_context )
959
+ ret = core -> ops -> save_context (core -> hw );
958
960
959
961
return ret ;
960
962
}
961
963
962
- static void _clk_restore_context (struct clk_core * clk )
964
+ static void clk_core_restore_context (struct clk_core * core )
963
965
{
964
966
struct clk_core * child ;
965
967
966
- if (clk -> ops && clk -> ops -> restore_context )
967
- clk -> ops -> restore_context (clk -> hw );
968
+ if (core -> ops && core -> ops -> restore_context )
969
+ core -> ops -> restore_context (core -> hw );
968
970
969
- hlist_for_each_entry (child , & clk -> children , child_node )
970
- _clk_restore_context (child );
971
+ hlist_for_each_entry (child , & core -> children , child_node )
972
+ clk_core_restore_context (child );
971
973
}
972
974
973
975
/**
@@ -983,13 +985,13 @@ int clk_save_context(void)
983
985
int ret ;
984
986
985
987
hlist_for_each_entry (clk , & clk_root_list , child_node ) {
986
- ret = _clk_save_context (clk );
988
+ ret = clk_core_save_context (clk );
987
989
if (ret < 0 )
988
990
return ret ;
989
991
}
990
992
991
993
hlist_for_each_entry (clk , & clk_orphan_list , child_node ) {
992
- ret = _clk_save_context (clk );
994
+ ret = clk_core_save_context (clk );
993
995
if (ret < 0 )
994
996
return ret ;
995
997
}
@@ -1006,13 +1008,13 @@ EXPORT_SYMBOL_GPL(clk_save_context);
1006
1008
*/
1007
1009
void clk_restore_context (void )
1008
1010
{
1009
- struct clk_core * clk ;
1011
+ struct clk_core * core ;
1010
1012
1011
- hlist_for_each_entry (clk , & clk_root_list , child_node )
1012
- _clk_restore_context ( clk );
1013
+ hlist_for_each_entry (core , & clk_root_list , child_node )
1014
+ clk_core_restore_context ( core );
1013
1015
1014
- hlist_for_each_entry (clk , & clk_orphan_list , child_node )
1015
- _clk_restore_context ( clk );
1016
+ hlist_for_each_entry (core , & clk_orphan_list , child_node )
1017
+ clk_core_restore_context ( core );
1016
1018
}
1017
1019
EXPORT_SYMBOL_GPL (clk_restore_context );
1018
1020
0 commit comments