@@ -124,24 +124,25 @@ static int pwrseq_thead_gpu_match(struct pwrseq_device *pwrseq,
124
124
125
125
/* We only match the specific T-HEAD TH1520 GPU compatible */
126
126
if (!of_device_is_compatible (dev -> of_node , "thead,th1520-gpu" ))
127
- return 0 ;
127
+ return PWRSEQ_NO_MATCH ;
128
128
129
129
ret = of_parse_phandle_with_args (dev -> of_node , "power-domains" ,
130
130
"#power-domain-cells" , 0 , & pwr_spec );
131
131
if (ret )
132
- return 0 ;
132
+ return PWRSEQ_NO_MATCH ;
133
133
134
134
/* Additionally verify consumer device has AON as power-domain */
135
135
if (pwr_spec .np != ctx -> aon_node || pwr_spec .args [0 ] != TH1520_GPU_PD ) {
136
136
of_node_put (pwr_spec .np );
137
- return 0 ;
137
+ return PWRSEQ_NO_MATCH ;
138
138
}
139
139
140
140
of_node_put (pwr_spec .np );
141
141
142
142
/* If a consumer is already bound, only allow a re-match from it */
143
143
if (ctx -> consumer_node )
144
- return ctx -> consumer_node == dev -> of_node ? 1 : 0 ;
144
+ return ctx -> consumer_node == dev -> of_node ?
145
+ PWRSEQ_MATCH_OK : PWRSEQ_NO_MATCH ;
145
146
146
147
ctx -> num_clks = ARRAY_SIZE (clk_names );
147
148
ctx -> clks = kcalloc (ctx -> num_clks , sizeof (* ctx -> clks ), GFP_KERNEL );
@@ -163,7 +164,7 @@ static int pwrseq_thead_gpu_match(struct pwrseq_device *pwrseq,
163
164
164
165
ctx -> consumer_node = of_node_get (dev -> of_node );
165
166
166
- return 1 ;
167
+ return PWRSEQ_MATCH_OK ;
167
168
168
169
err_put_clks :
169
170
clk_bulk_put (ctx -> num_clks , ctx -> clks );
0 commit comments