From: Alexey Starikovskiy <aystarik@gmail.com>
To: Frans Pop <elendil@planet.nl>
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [2.6.23-rc7] main.c: undefined reference to `acpi_sleep_prepare'
Date: Sun, 23 Sep 2007 10:41:38 +0400 [thread overview]
Message-ID: <46F60AA2.1060500@gmail.com> (raw)
In-Reply-To: <200709230152.31120.elendil@planet.nl>
[-- Attachment #1: Type: text/plain, Size: 931 bytes --]
Frans Pop wrote:
> I wanted to test 5a50fe709d527f31 and thus created a config with ACPI and
> CONFIG_HIBERNATION, but without CONFIG_SUSPEND, which resulted in (git
> checkout updated to 1f0cff6e4d579ab0):
>
> GEN .version
> CHK include/linux/compile.h
> UPD include/linux/compile.h
> CC init/version.o
> LD init/built-in.o
> LD .tmp_vmlinux1
> drivers/built-in.o: In function `acpi_power_off_prepare':
> main.c:(.text+0x32282): undefined reference to `acpi_sleep_prepare'
> drivers/built-in.o: In function `acpi_hibernation_prepare':
> main.c:(.text+0x3228c): undefined reference to `acpi_sleep_prepare'
> make[1]: *** [.tmp_vmlinux1] Error 1
> make[1]: Leaving directory `/home/fjp/projects/kernel/linux-2.6'
> make: *** [debian/stamp-build-kernel] Error 2
>
>
yep... acpi_sleep_prepare was put under CONFIG_SUSPEND spanning half of the file...
this patch moves it out.
Thanks,
Alex.
[-- Attachment #2: move_acpi_sleep_prepare_outside_of_CONFIG_SUSPEND.patch --]
[-- Type: text/x-patch, Size: 1862 bytes --]
ACPI: suspend: move acpi_sleep_prepare outside of CONFIG_SUSPEND
From: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
drivers/acpi/sleep/main.c | 42 +++++++++++++++++++++---------------------
1 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 85633c5..c79edcb 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -26,6 +26,27 @@ u8 sleep_states[ACPI_S_STATE_COUNT];
static u32 acpi_target_sleep_state = ACPI_STATE_S0;
+int acpi_sleep_prepare(u32 acpi_state)
+{
+#ifdef CONFIG_ACPI_SLEEP
+ /* do we have a wakeup address for S2 and S3? */
+ if (acpi_state == ACPI_STATE_S3) {
+ if (!acpi_wakeup_address) {
+ return -EFAULT;
+ }
+ acpi_set_firmware_waking_vector((acpi_physical_address)
+ virt_to_phys((void *)
+ acpi_wakeup_address));
+
+ }
+ ACPI_FLUSH_CPU_CACHE();
+ acpi_enable_wakeup_device_prep(acpi_state);
+#endif
+ acpi_gpe_sleep_prepare(acpi_state);
+ acpi_enter_sleep_state_prep(acpi_state);
+ return 0;
+}
+
#ifdef CONFIG_SUSPEND
static struct pm_ops acpi_pm_ops;
@@ -60,27 +81,6 @@ static int acpi_pm_set_target(suspend_state_t pm_state)
return error;
}
-int acpi_sleep_prepare(u32 acpi_state)
-{
-#ifdef CONFIG_ACPI_SLEEP
- /* do we have a wakeup address for S2 and S3? */
- if (acpi_state == ACPI_STATE_S3) {
- if (!acpi_wakeup_address) {
- return -EFAULT;
- }
- acpi_set_firmware_waking_vector((acpi_physical_address)
- virt_to_phys((void *)
- acpi_wakeup_address));
-
- }
- ACPI_FLUSH_CPU_CACHE();
- acpi_enable_wakeup_device_prep(acpi_state);
-#endif
- acpi_gpe_sleep_prepare(acpi_state);
- acpi_enter_sleep_state_prep(acpi_state);
- return 0;
-}
-
/**
* acpi_pm_prepare - Do preliminary suspend work.
* @pm_state: ignored
next prev parent reply other threads:[~2007-09-23 6:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-22 23:52 [2.6.23-rc7] main.c: undefined reference to `acpi_sleep_prepare' Frans Pop
2007-09-23 6:41 ` Alexey Starikovskiy [this message]
2007-09-23 13:08 ` Frans Pop
2007-09-23 13:35 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46F60AA2.1060500@gmail.com \
--to=aystarik@gmail.com \
--cc=elendil@planet.nl \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).