aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/dcdbas.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/dcdbas.c')
-rw-r--r--drivers/firmware/dcdbas.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c
index d6543fc4a923..339f405ff708 100644
--- a/drivers/firmware/dcdbas.c
+++ b/drivers/firmware/dcdbas.c
@@ -484,26 +484,15 @@ static void dcdbas_host_control(void)
484static int dcdbas_reboot_notify(struct notifier_block *nb, unsigned long code, 484static int dcdbas_reboot_notify(struct notifier_block *nb, unsigned long code,
485 void *unused) 485 void *unused)
486{ 486{
487 static unsigned int notify_cnt = 0;
488
489 switch (code) { 487 switch (code) {
490 case SYS_DOWN: 488 case SYS_DOWN:
491 case SYS_HALT: 489 case SYS_HALT:
492 case SYS_POWER_OFF: 490 case SYS_POWER_OFF:
493 if (host_control_on_shutdown) { 491 if (host_control_on_shutdown) {
494 /* firmware is going to perform host control action */ 492 /* firmware is going to perform host control action */
495 if (++notify_cnt == 2) { 493 printk(KERN_WARNING "Please wait for shutdown "
496 printk(KERN_WARNING 494 "action to complete...\n");
497 "Please wait for shutdown " 495 dcdbas_host_control();
498 "action to complete...\n");
499 dcdbas_host_control();
500 }
501 /*
502 * register again and initiate the host control
503 * action on the second notification to allow
504 * everyone that registered to be notified
505 */
506 register_reboot_notifier(nb);
507 } 496 }
508 break; 497 break;
509 } 498 }
@@ -514,7 +503,7 @@ static int dcdbas_reboot_notify(struct notifier_block *nb, unsigned long code,
514static struct notifier_block dcdbas_reboot_nb = { 503static struct notifier_block dcdbas_reboot_nb = {
515 .notifier_call = dcdbas_reboot_notify, 504 .notifier_call = dcdbas_reboot_notify,
516 .next = NULL, 505 .next = NULL,
517 .priority = 0 506 .priority = INT_MIN
518}; 507};
519 508
520static DCDBAS_BIN_ATTR_RW(smi_data); 509static DCDBAS_BIN_ATTR_RW(smi_data);