diff options
| author | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
| commit | bac30d1a78d0f11c613968fc8b351a91ed465386 (patch) | |
| tree | e52f3c876522a2f6047a6ec1c27df2e8a79486b8 /drivers/firmware/dcdbas.c | |
| parent | e8222502ee6157e2713da9e0792c21f4ad458d50 (diff) | |
| parent | ca9ba4471c1203bb6e759b76e83167fec54fe590 (diff) | |
Merge ../linux-2.6
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); |
