diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-07-01 02:49:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-07-01 03:31:25 -0400 |
commit | 0a54cec0c25cc49e3b68b14c205f1f6cff13f5e1 (patch) | |
tree | eb4e63ee9ae1fcaf9aa53a1668e55c09516052d9 /drivers/acpi/wakeup.c | |
parent | ec8c27e04f89a7575ca2c4facb99152e03d6a99c (diff) | |
parent | 980019d74e4b2428362b36a0506519d6d9460800 (diff) |
Merge branch 'linus' into core/rcu
Conflicts:
fs/fs-writeback.c
Merge reason: Resolve the conflict
Note, i picked the version from Linus's tree, which effectively reverts
the fs-writeback.c bits of:
b97181f: fs: remove all rcu head initializations, except on_stack initializations
As the upstream changes to this file changed this code heavily and the
first attempt to resolve the conflict resulted in a non-booting kernel.
It's safer to re-try this portion of the commit cleanly.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/acpi/wakeup.c')
-rw-r--r-- | drivers/acpi/wakeup.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/acpi/wakeup.c b/drivers/acpi/wakeup.c index 4b9d339a6e28..388747a7ef4f 100644 --- a/drivers/acpi/wakeup.c +++ b/drivers/acpi/wakeup.c | |||
@@ -64,16 +64,13 @@ void acpi_enable_wakeup_device(u8 sleep_state) | |||
64 | struct acpi_device *dev = | 64 | struct acpi_device *dev = |
65 | container_of(node, struct acpi_device, wakeup_list); | 65 | container_of(node, struct acpi_device, wakeup_list); |
66 | 66 | ||
67 | if (!dev->wakeup.flags.valid) | 67 | if (!dev->wakeup.flags.valid || !dev->wakeup.state.enabled |
68 | continue; | ||
69 | |||
70 | if ((!dev->wakeup.state.enabled && !dev->wakeup.prepare_count) | ||
71 | || sleep_state > (u32) dev->wakeup.sleep_state) | 68 | || sleep_state > (u32) dev->wakeup.sleep_state) |
72 | continue; | 69 | continue; |
73 | 70 | ||
74 | /* The wake-up power should have been enabled already. */ | 71 | /* The wake-up power should have been enabled already. */ |
75 | acpi_set_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number, | 72 | acpi_enable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number, |
76 | ACPI_GPE_ENABLE); | 73 | ACPI_GPE_TYPE_WAKE); |
77 | } | 74 | } |
78 | } | 75 | } |
79 | 76 | ||
@@ -96,6 +93,8 @@ void acpi_disable_wakeup_device(u8 sleep_state) | |||
96 | || (sleep_state > (u32) dev->wakeup.sleep_state)) | 93 | || (sleep_state > (u32) dev->wakeup.sleep_state)) |
97 | continue; | 94 | continue; |
98 | 95 | ||
96 | acpi_disable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number, | ||
97 | ACPI_GPE_TYPE_WAKE); | ||
99 | acpi_disable_wakeup_device_power(dev); | 98 | acpi_disable_wakeup_device_power(dev); |
100 | } | 99 | } |
101 | } | 100 | } |
@@ -109,13 +108,8 @@ int __init acpi_wakeup_device_init(void) | |||
109 | struct acpi_device *dev = container_of(node, | 108 | struct acpi_device *dev = container_of(node, |
110 | struct acpi_device, | 109 | struct acpi_device, |
111 | wakeup_list); | 110 | wakeup_list); |
112 | /* In case user doesn't load button driver */ | 111 | if (dev->wakeup.flags.always_enabled) |
113 | if (!dev->wakeup.flags.always_enabled || | 112 | dev->wakeup.state.enabled = 1; |
114 | dev->wakeup.state.enabled) | ||
115 | continue; | ||
116 | acpi_enable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number, | ||
117 | ACPI_GPE_TYPE_WAKE); | ||
118 | dev->wakeup.state.enabled = 1; | ||
119 | } | 113 | } |
120 | mutex_unlock(&acpi_device_lock); | 114 | mutex_unlock(&acpi_device_lock); |
121 | return 0; | 115 | return 0; |