@@ -53,6 +53,7 @@ struct at91_reset {
53
53
void __iomem * rstc_base ;
54
54
void __iomem * ramc_base [2 ];
55
55
struct clk * sclk ;
56
+ struct notifier_block nb ;
56
57
};
57
58
58
59
static struct at91_reset reset ;
@@ -205,10 +206,6 @@ static const struct of_device_id at91_reset_of_match[] = {
205
206
};
206
207
MODULE_DEVICE_TABLE (of , at91_reset_of_match );
207
208
208
- static struct notifier_block at91_restart_nb = {
209
- .priority = 192 ,
210
- };
211
-
212
209
static int __init at91_reset_probe (struct platform_device * pdev )
213
210
{
214
211
const struct of_device_id * match ;
@@ -235,7 +232,8 @@ static int __init at91_reset_probe(struct platform_device *pdev)
235
232
}
236
233
237
234
match = of_match_node (at91_reset_of_match , pdev -> dev .of_node );
238
- at91_restart_nb .notifier_call = match -> data ;
235
+ reset .nb .notifier_call = match -> data ;
236
+ reset .nb .priority = 192 ;
239
237
240
238
reset .sclk = devm_clk_get (& pdev -> dev , NULL );
241
239
if (IS_ERR (reset .sclk ))
@@ -247,7 +245,7 @@ static int __init at91_reset_probe(struct platform_device *pdev)
247
245
return ret ;
248
246
}
249
247
250
- ret = register_restart_handler (& at91_restart_nb );
248
+ ret = register_restart_handler (& reset . nb );
251
249
if (ret ) {
252
250
clk_disable_unprepare (reset .sclk );
253
251
return ret ;
@@ -260,7 +258,7 @@ static int __init at91_reset_probe(struct platform_device *pdev)
260
258
261
259
static int __exit at91_reset_remove (struct platform_device * pdev )
262
260
{
263
- unregister_restart_handler (& at91_restart_nb );
261
+ unregister_restart_handler (& reset . nb );
264
262
clk_disable_unprepare (reset .sclk );
265
263
266
264
return 0 ;
0 commit comments