diff options
author | Jody McIntyre <scjody@modernduck.com> | 2006-03-28 20:24:39 -0500 |
---|---|---|
committer | Jody McIntyre <scjody@modernduck.com> | 2006-03-28 20:24:39 -0500 |
commit | c0e4077c946104e5d8a62f835dcdca5c79c8af7d (patch) | |
tree | c1f458722f86690a6172bbac2dfef3241ba0ec7e /drivers/firmware/dcdbas.c | |
parent | 94c2d01a537daf51a9fcf229d7d2204c979355d9 (diff) | |
parent | ca9ba4471c1203bb6e759b76e83167fec54fe590 (diff) |
Merge with git+ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/firmware/dcdbas.c')
-rw-r--r-- | drivers/firmware/dcdbas.c | 19 |
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) | |||
484 | static int dcdbas_reboot_notify(struct notifier_block *nb, unsigned long code, | 484 | static 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, | |||
514 | static struct notifier_block dcdbas_reboot_nb = { | 503 | static 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 | ||
520 | static DCDBAS_BIN_ATTR_RW(smi_data); | 509 | static DCDBAS_BIN_ATTR_RW(smi_data); |