public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: David Rientjes <rientjes@google.com>
Cc: Aaron Lu <aaron.lu@intel.com>, Huang Ying <ying.huang@intel.com>,
	Len Brown <lenb@kernel.org>, Lv Zheng <lv.zheng@intel.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: Re: [patch] acpi, pm: fix build breakage
Date: Thu, 08 Nov 2012 22:15:36 +0100	[thread overview]
Message-ID: <3279768.UJJiLZErXa@vostro.rjw.lan> (raw)
In-Reply-To: <alpine.DEB.2.00.1211081119350.8749@chino.kir.corp.google.com>

On Thursday, November 08, 2012 11:20:01 AM David Rientjes wrote:
> Commit b87b49cd0efd ("ACPI / PM: Move device PM functions related to sleep 
> states") declared acpi_target_system_state() for CONFIG_PM_SLEEP whereas 
> it is only defined for CONFIG_ACPI_SLEEP, resulting in the following link 
> error:
> 
> drivers/built-in.o: In function `acpi_pm_device_sleep_wake':
> drivers/acpi/device_pm.c:342: undefined reference to `acpi_target_system_state'
> drivers/built-in.o: In function `acpi_dev_suspend_late':
> drivers/acpi/device_pm.c:501: undefined reference to `acpi_target_system_state'
> drivers/built-in.o: In function `acpi_pm_device_sleep_state':
> drivers/acpi/device_pm.c:221: undefined reference to `acpi_target_system_state'
> 
> Define it only for CONFIG_ACPI_SLEEP and fallback to a dummy definition 
> for other configs.
> 
> Signed-off-by: David Rientjes <rientjes@google.com>

I've received the patch and will apply it when I get back home from Spain.

Thanks,
Rafael


> ---
>  include/acpi/acpi_bus.h |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> --- a/include/acpi/acpi_bus.h
> +++ b/include/acpi/acpi_bus.h
> @@ -469,11 +469,9 @@ static inline int acpi_pm_device_run_wake(struct device *dev, bool enable)
>  #endif
>  
>  #ifdef CONFIG_PM_SLEEP
> -u32 acpi_target_system_state(void);
>  int __acpi_device_sleep_wake(struct acpi_device *, u32, bool);
>  int acpi_pm_device_sleep_wake(struct device *, bool);
>  #else
> -static inline u32 acpi_target_system_state(void) { return ACPI_STATE_S0; }
>  static inline int __acpi_device_sleep_wake(struct acpi_device *adev,
>  					   u32 target_state, bool enable)
>  {
> @@ -485,6 +483,12 @@ static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
>  }
>  #endif
>  
> +#ifdef CONFIG_ACPI_SLEEP
> +u32 acpi_target_system_state(void);
> +#else
> +static inline u32 acpi_target_system_state(void) { return ACPI_STATE_S0; }
> +#endif
> +
>  static inline bool acpi_device_power_manageable(struct acpi_device *adev)
>  {
>  	return adev->flags.power_manageable;
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2012-11-08 21:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29  9:06 [PATCH 0/7] ACPI / PM: ACPI power management callback routines for subsystems Rafael J. Wysocki
2012-10-29  9:07 ` [PATCH 1/7] ACPI / PM: Move routines for adding/removing device wakeup notifiers Rafael J. Wysocki
2012-10-29  9:09 ` [PATCH 2/7] ACPI / PM: Move device power state selection routine to device_pm.c Rafael J. Wysocki
2012-11-06  4:56   ` Aaron Lu
2012-11-06 13:03     ` Rafael J. Wysocki
2012-10-29  9:10 ` [PATCH 3/7] ACPI / PM: Move runtime remote wakeup setup " Rafael J. Wysocki
2012-10-29  9:10 ` [PATCH 4/7] ACPI / PM: Split device wakeup management routines Rafael J. Wysocki
2012-10-29  9:11 ` [PATCH 5/7] ACPI / PM: Provide device PM functions operating on struct acpi_device Rafael J. Wysocki
2012-10-30  7:28   ` Aaron Lu
2012-10-30 15:20     ` Rafael J. Wysocki
2012-11-02  5:17       ` Aaron Lu
2012-11-02 11:19         ` Rafael J. Wysocki
2012-10-29  9:12 ` [PATCH 6/7] ACPI / PM: Move device PM functions related to sleep states Rafael J. Wysocki
2012-11-06 19:52   ` David Rientjes
2012-11-08 19:20     ` [patch] acpi, pm: fix build breakage David Rientjes
2012-11-08 21:15       ` Rafael J. Wysocki [this message]
2012-10-29  9:13 ` [PATCH 7/7] ACPI / PM: Provide ACPI PM callback routines for subsystems 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=3279768.UJJiLZErXa@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=aaron.lu@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=rientjes@google.com \
    --cc=ying.huang@intel.com \
    /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