File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
arch/powerpc/platforms/powernv Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -369,6 +369,12 @@ static struct notifier_block opal_prd_event_nb = {
369
369
.priority = 0 ,
370
370
};
371
371
372
+ static struct notifier_block opal_prd_event_nb2 = {
373
+ .notifier_call = opal_prd_msg_notifier ,
374
+ .next = NULL ,
375
+ .priority = 0 ,
376
+ };
377
+
372
378
static int opal_prd_probe (struct platform_device * pdev )
373
379
{
374
380
int rc ;
@@ -390,9 +396,10 @@ static int opal_prd_probe(struct platform_device *pdev)
390
396
return rc ;
391
397
}
392
398
393
- rc = opal_message_notifier_register (OPAL_MSG_PRD2 , & opal_prd_event_nb );
399
+ rc = opal_message_notifier_register (OPAL_MSG_PRD2 , & opal_prd_event_nb2 );
394
400
if (rc ) {
395
401
pr_err ("Couldn't register PRD2 event notifier\n" );
402
+ opal_message_notifier_unregister (OPAL_MSG_PRD , & opal_prd_event_nb );
396
403
return rc ;
397
404
}
398
405
@@ -401,6 +408,8 @@ static int opal_prd_probe(struct platform_device *pdev)
401
408
pr_err ("failed to register miscdev\n" );
402
409
opal_message_notifier_unregister (OPAL_MSG_PRD ,
403
410
& opal_prd_event_nb );
411
+ opal_message_notifier_unregister (OPAL_MSG_PRD2 ,
412
+ & opal_prd_event_nb2 );
404
413
return rc ;
405
414
}
406
415
@@ -411,6 +420,7 @@ static int opal_prd_remove(struct platform_device *pdev)
411
420
{
412
421
misc_deregister (& opal_prd_dev );
413
422
opal_message_notifier_unregister (OPAL_MSG_PRD , & opal_prd_event_nb );
423
+ opal_message_notifier_unregister (OPAL_MSG_PRD2 , & opal_prd_event_nb2 );
414
424
return 0 ;
415
425
}
416
426
You can’t perform that action at this time.
0 commit comments