diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-26 11:56:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-26 11:56:28 -0400 |
commit | 1f23f4209f2b99fdddf09821eead6364a6dd9654 (patch) | |
tree | 55ea6a59166d1690346304f6c0fb7e6d52cdbe6c | |
parent | e4b42be77ecc663550b515fcb7761b01fac0f272 (diff) | |
parent | 78e1ca49c7ead5cd00882ed0c776260857613122 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI: hpet: ACPI Error (utglobal-0126): Unknown exception code: 0xFFFFFFF0
ACPI: CONFIG_ACPI_SLEEP=n power off regression in 2.6.23-rc8 (NOT in rc7)
ACPI: suspend: build-fix for CONFIG_SUSPEND=n and CONFIG_HIBERNATION=y
-rw-r--r-- | drivers/acpi/sleep/Makefile | 2 | ||||
-rw-r--r-- | drivers/acpi/sleep/main.c | 46 | ||||
-rw-r--r-- | drivers/char/hpet.c | 6 | ||||
-rw-r--r-- | include/acpi/acpi_drivers.h | 4 |
4 files changed, 29 insertions, 29 deletions
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile index ba9bd403d443..f1fb888c2d29 100644 --- a/drivers/acpi/sleep/Makefile +++ b/drivers/acpi/sleep/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | obj-y := wakeup.o | 1 | obj-y := wakeup.o |
2 | obj-$(CONFIG_ACPI_SLEEP) += main.o | 2 | obj-y += main.o |
3 | obj-$(CONFIG_ACPI_SLEEP) += proc.o | 3 | obj-$(CONFIG_ACPI_SLEEP) += proc.o |
4 | 4 | ||
5 | EXTRA_CFLAGS += $(ACPI_CFLAGS) | 5 | EXTRA_CFLAGS += $(ACPI_CFLAGS) |
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 85633c585aab..2cbb9aabd00e 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -24,7 +24,30 @@ | |||
24 | 24 | ||
25 | u8 sleep_states[ACPI_S_STATE_COUNT]; | 25 | u8 sleep_states[ACPI_S_STATE_COUNT]; |
26 | 26 | ||
27 | #ifdef CONFIG_PM_SLEEP | ||
27 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; | 28 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; |
29 | #endif | ||
30 | |||
31 | int acpi_sleep_prepare(u32 acpi_state) | ||
32 | { | ||
33 | #ifdef CONFIG_ACPI_SLEEP | ||
34 | /* do we have a wakeup address for S2 and S3? */ | ||
35 | if (acpi_state == ACPI_STATE_S3) { | ||
36 | if (!acpi_wakeup_address) { | ||
37 | return -EFAULT; | ||
38 | } | ||
39 | acpi_set_firmware_waking_vector((acpi_physical_address) | ||
40 | virt_to_phys((void *) | ||
41 | acpi_wakeup_address)); | ||
42 | |||
43 | } | ||
44 | ACPI_FLUSH_CPU_CACHE(); | ||
45 | acpi_enable_wakeup_device_prep(acpi_state); | ||
46 | #endif | ||
47 | acpi_gpe_sleep_prepare(acpi_state); | ||
48 | acpi_enter_sleep_state_prep(acpi_state); | ||
49 | return 0; | ||
50 | } | ||
28 | 51 | ||
29 | #ifdef CONFIG_SUSPEND | 52 | #ifdef CONFIG_SUSPEND |
30 | static struct pm_ops acpi_pm_ops; | 53 | static struct pm_ops acpi_pm_ops; |
@@ -60,27 +83,6 @@ static int acpi_pm_set_target(suspend_state_t pm_state) | |||
60 | return error; | 83 | return error; |
61 | } | 84 | } |
62 | 85 | ||
63 | int acpi_sleep_prepare(u32 acpi_state) | ||
64 | { | ||
65 | #ifdef CONFIG_ACPI_SLEEP | ||
66 | /* do we have a wakeup address for S2 and S3? */ | ||
67 | if (acpi_state == ACPI_STATE_S3) { | ||
68 | if (!acpi_wakeup_address) { | ||
69 | return -EFAULT; | ||
70 | } | ||
71 | acpi_set_firmware_waking_vector((acpi_physical_address) | ||
72 | virt_to_phys((void *) | ||
73 | acpi_wakeup_address)); | ||
74 | |||
75 | } | ||
76 | ACPI_FLUSH_CPU_CACHE(); | ||
77 | acpi_enable_wakeup_device_prep(acpi_state); | ||
78 | #endif | ||
79 | acpi_gpe_sleep_prepare(acpi_state); | ||
80 | acpi_enter_sleep_state_prep(acpi_state); | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | /** | 86 | /** |
85 | * acpi_pm_prepare - Do preliminary suspend work. | 87 | * acpi_pm_prepare - Do preliminary suspend work. |
86 | * @pm_state: ignored | 88 | * @pm_state: ignored |
@@ -299,6 +301,7 @@ int acpi_suspend(u32 acpi_state) | |||
299 | return -EINVAL; | 301 | return -EINVAL; |
300 | } | 302 | } |
301 | 303 | ||
304 | #ifdef CONFIG_PM_SLEEP | ||
302 | /** | 305 | /** |
303 | * acpi_pm_device_sleep_state - return preferred power state of ACPI device | 306 | * acpi_pm_device_sleep_state - return preferred power state of ACPI device |
304 | * in the system sleep state given by %acpi_target_sleep_state | 307 | * in the system sleep state given by %acpi_target_sleep_state |
@@ -373,6 +376,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p) | |||
373 | *d_min_p = d_min; | 376 | *d_min_p = d_min; |
374 | return d_max; | 377 | return d_max; |
375 | } | 378 | } |
379 | #endif | ||
376 | 380 | ||
377 | static void acpi_power_off_prepare(void) | 381 | static void acpi_power_off_prepare(void) |
378 | { | 382 | { |
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 7ecffc9c738f..fd51554ab081 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -943,14 +943,14 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) | |||
943 | printk(KERN_DEBUG "%s: 0x%lx is busy\n", | 943 | printk(KERN_DEBUG "%s: 0x%lx is busy\n", |
944 | __FUNCTION__, hdp->hd_phys_address); | 944 | __FUNCTION__, hdp->hd_phys_address); |
945 | iounmap(hdp->hd_address); | 945 | iounmap(hdp->hd_address); |
946 | return -EBUSY; | 946 | return AE_ALREADY_EXISTS; |
947 | } | 947 | } |
948 | } else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) { | 948 | } else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) { |
949 | struct acpi_resource_fixed_memory32 *fixmem32; | 949 | struct acpi_resource_fixed_memory32 *fixmem32; |
950 | 950 | ||
951 | fixmem32 = &res->data.fixed_memory32; | 951 | fixmem32 = &res->data.fixed_memory32; |
952 | if (!fixmem32) | 952 | if (!fixmem32) |
953 | return -EINVAL; | 953 | return AE_NO_MEMORY; |
954 | 954 | ||
955 | hdp->hd_phys_address = fixmem32->address; | 955 | hdp->hd_phys_address = fixmem32->address; |
956 | hdp->hd_address = ioremap(fixmem32->address, | 956 | hdp->hd_address = ioremap(fixmem32->address, |
@@ -960,7 +960,7 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) | |||
960 | printk(KERN_DEBUG "%s: 0x%lx is busy\n", | 960 | printk(KERN_DEBUG "%s: 0x%lx is busy\n", |
961 | __FUNCTION__, hdp->hd_phys_address); | 961 | __FUNCTION__, hdp->hd_phys_address); |
962 | iounmap(hdp->hd_address); | 962 | iounmap(hdp->hd_address); |
963 | return -EBUSY; | 963 | return AE_ALREADY_EXISTS; |
964 | } | 964 | } |
965 | } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) { | 965 | } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) { |
966 | struct acpi_resource_extended_irq *irqp; | 966 | struct acpi_resource_extended_irq *irqp; |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 202acb9ff4d0..f85f77a538aa 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -147,10 +147,6 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle) | |||
147 | /*-------------------------------------------------------------------------- | 147 | /*-------------------------------------------------------------------------- |
148 | Suspend/Resume | 148 | Suspend/Resume |
149 | -------------------------------------------------------------------------- */ | 149 | -------------------------------------------------------------------------- */ |
150 | #ifdef CONFIG_ACPI_SLEEP | ||
151 | extern int acpi_sleep_init(void); | 150 | extern int acpi_sleep_init(void); |
152 | #else | ||
153 | static inline int acpi_sleep_init(void) { return 0; } | ||
154 | #endif | ||
155 | 151 | ||
156 | #endif /*__ACPI_DRIVERS_H__*/ | 152 | #endif /*__ACPI_DRIVERS_H__*/ |