From patchwork Thu Nov 8 19:20:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Rientjes X-Patchwork-Id: 1717201 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 186543FCDE for ; Thu, 8 Nov 2012 19:20:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756666Ab2KHTUI (ORCPT ); Thu, 8 Nov 2012 14:20:08 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:36893 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756572Ab2KHTUG (ORCPT ); Thu, 8 Nov 2012 14:20:06 -0500 Received: by mail-pa0-f46.google.com with SMTP id hz1so2205914pad.19 for ; Thu, 08 Nov 2012 11:20:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=HZE1ioGTY9N6o45dd0h74Lc/M29fjvggNyQ69wzZmZo=; b=lBNbEbck9hXQLLDnd5kPvLXrgaUl17R1zARf8IuEyYb/sZTmbqxoC4n6gxiq8MqC8G OFTElyeYqDkCI4mL+VKk8yPmV/GQqXzXoSFDHLgLw55MGygcL/ktbFbxNNRAutKtLdeg EoiqLtXR/7fdardFUJpsU44CC0Y0bL/JdI4C0DqeZh4z0HUUn9dCa666zXqC8i9V5myq nWKyXY26Ti7X+zVuOp7qLCwbw23yto6qrtmZK92Y/MxDWDAbaXTfvTdWDV5+7mStljqf 6enR7yboX//bvOIuphi9OsQVFRdHlxn7XY5EyQJGhbsUNsf50KikU32Bl0dkx1Qb3SNy AOXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type:x-gm-message-state; bh=HZE1ioGTY9N6o45dd0h74Lc/M29fjvggNyQ69wzZmZo=; b=MyoDKtd2hxF0iMSbOKSHqKlnpsXjNiZaKcOqiCzk/+VNa4s80zeR7+2KiJsTdZcfBx zLd9+t1UhvXzHRKCavfDry8TKADyz0WIWyERi9c9nQFQ4NT7UH6e/n2pxkMbGc3N6MwV wwAkRfmQl+bjGXVy6L1DOrttYd+BaCUGZFnlOuuB4CvcvYgoCRu9AFhNSaw7FSQ/LcgG VhBUTJ2GEP9hDsEe2sdyy+5KfSvfXbkwflCDgmitqeWqjoByUKTvhWlG8UdaL088UMyB k4lSKSvC2n+SDN/t8L3/6NRkQsz99M3i9/MM+9rV2v/cOWNEywmOwVoQiXdAmOk8mVA5 ffhA== Received: by 10.68.226.167 with SMTP id rt7mr26892534pbc.94.1352402405768; Thu, 08 Nov 2012 11:20:05 -0800 (PST) Received: from [2620:0:1008:1101:be30:5bff:fed8:5e64] ([2620:0:1008:1101:be30:5bff:fed8:5e64]) by mx.google.com with ESMTPS id j9sm16564496paw.2.2012.11.08.11.20.02 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Nov 2012 11:20:04 -0800 (PST) Date: Thu, 8 Nov 2012 11:20:01 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: "Rafael J. Wysocki" cc: Aaron Lu , Huang Ying , Len Brown , Lv Zheng , Adrian Hunter , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [patch] acpi, pm: fix build breakage In-Reply-To: Message-ID: References: <1766582.8gdQKXoi0K@vostro.rjw.lan> <1456107.KxymqUQLId@vostro.rjw.lan> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkztM1NqHqQYq4i1P86PMJ5dnk/exQPajPTFw7HUsWXcZ39jjvq+F/U85Wp0n0DBeoj9XSK3ArmxRgawOQ8yVcn0KFAT1BkaoaW0L1ByNS6P8o79Hwqg1kziIbScrHUhusriGm3nfbdxwGP3c0b/BNHwvt23XYjmjofWJZXgiY58hk47PkgTEmEoh3kjxza6H8b/0MZ Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 --- include/acpi/acpi_bus.h | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;