From patchwork Wed Jan 12 21:03:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 474931 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0CL4aWM017787 for ; Wed, 12 Jan 2011 21:04:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756203Ab1ALVEY (ORCPT ); Wed, 12 Jan 2011 16:04:24 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:57547 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756186Ab1ALVEY (ORCPT ); Wed, 12 Jan 2011 16:04:24 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 793F919AE62; Wed, 12 Jan 2011 21:51:17 +0100 (CET) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06050-07; Wed, 12 Jan 2011 21:50:57 +0100 (CET) Received: from ferrari.rjw.lan (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 557A91999AD; Wed, 12 Jan 2011 21:50:57 +0100 (CET) From: "Rafael J. Wysocki" To: Randy Dunlap Subject: [PATCH] ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework Date: Wed, 12 Jan 2011 22:03:20 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.37+; KDE/4.4.4; x86_64; ; ) Cc: Stephen Rothwell , linux-next@vger.kernel.org, LKML , Jiri Slaby , lenb@kernel.org, linux-acpi@vger.kernel.org References: <20110112141822.c29314c4.sfr@canb.auug.org.au> <201101122135.55567.rjw@sisk.pl> <4D2E13C9.7030704@oracle.com> In-Reply-To: <4D2E13C9.7030704@oracle.com> MIME-Version: 1.0 Message-Id: <201101122203.20657.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 12 Jan 2011 21:04:37 +0000 (UTC) Index: linux-2.6/drivers/acpi/internal.h =================================================================== --- linux-2.6.orig/drivers/acpi/internal.h +++ linux-2.6/drivers/acpi/internal.h @@ -91,7 +91,7 @@ void suspend_nvs_restore(void); static inline int acpi_sleep_proc_init(void) { return 0; } static inline int suspend_nvs_alloc(void) { return 0; } static inline void suspend_nvs_free(void) {} -static inline int suspend_nvs_save(void) {} +static inline int suspend_nvs_save(void) { return 0; } static inline void suspend_nvs_restore(void) {} #endif Index: linux-2.6/include/linux/acpi.h =================================================================== --- linux-2.6.orig/include/linux/acpi.h +++ linux-2.6/include/linux/acpi.h @@ -254,15 +254,6 @@ void __init acpi_old_suspend_ordering(vo void __init acpi_nvs_nosave(void); #endif /* CONFIG_PM_SLEEP */ -#ifdef CONFIG_ACPI_SLEEP -int suspend_nvs_register(unsigned long start, unsigned long size); -#else -static inline int suspend_nvs_register(unsigned long a, unsigned long b) -{ - return 0; -} -#endif - struct acpi_osc_context { char *uuid_str; /* uuid string */ int rev; @@ -361,4 +352,14 @@ static inline int acpi_table_parse(char return -1; } #endif /* !CONFIG_ACPI */ + +#ifdef CONFIG_ACPI_SLEEP +int suspend_nvs_register(unsigned long start, unsigned long size); +#else +static inline int suspend_nvs_register(unsigned long a, unsigned long b) +{ + return 0; +} +#endif + #endif /*_LINUX_ACPI_H*/