From patchwork Sat May 21 12:10:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 805782 Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4LCETkb005483 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sat, 21 May 2011 12:14:49 GMT Received: from daredevil.linux-foundation.org (localhost [127.0.0.1]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p4LCD2va023154; Sat, 21 May 2011 05:13:02 -0700 Received: from ogre.sisk.pl (ogre.sisk.pl [217.79.144.158]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p4LCCON9022998 for ; Sat, 21 May 2011 05:12:26 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id C4B431A770A; Sat, 21 May 2011 14:01:59 +0200 (CEST) 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 24611-10; Sat, 21 May 2011 14:01:29 +0200 (CEST) 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 505961A8FEE; Sat, 21 May 2011 14:01:29 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM mailing list Date: Sat, 21 May 2011 14:10:34 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.39+; KDE/4.6.0; x86_64; ; ) References: <201105211408.28671.rjw@sisk.pl> In-Reply-To: <201105211408.28671.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201105211410.34491.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Received-SPF: pass (localhost is always allowed.) X-Spam-Status: No, hits=-3.936 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.21 Cc: Frank Hofmann , LKML , Ralf Baechle , linux-sh@vger.kernel.org Subject: [linux-pm] [PATCH 2/3] PM / Hibernate: Remove arch_prepare_suspend() X-BeenThere: linux-pm@lists.linux-foundation.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux power management List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sat, 21 May 2011 12:14:49 +0000 (UTC) From: Rafael J. Wysocki All architectures supporting hibernation define arch_prepare_suspend() as an empty function, so remove it. Signed-off-by: Rafael J. Wysocki Acked-by: Ralf Baechle --- arch/frv/include/asm/suspend.h | 20 -------------------- arch/mips/include/asm/suspend.h | 2 -- arch/powerpc/include/asm/suspend.h | 6 ------ arch/s390/include/asm/suspend.h | 10 ---------- arch/sh/include/asm/suspend.h | 1 - arch/unicore32/include/asm/suspend.h | 1 - arch/x86/include/asm/suspend_32.h | 2 -- arch/x86/include/asm/suspend_64.h | 5 ----- kernel/power/hibernate.c | 4 ---- 9 files changed, 51 deletions(-) Index: linux-2.6/arch/frv/include/asm/suspend.h =================================================================== --- linux-2.6.orig/arch/frv/include/asm/suspend.h +++ /dev/null @@ -1,20 +0,0 @@ -/* suspend.h: suspension stuff - * - * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@redhat.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#ifndef _ASM_SUSPEND_H -#define _ASM_SUSPEND_H - -static inline int arch_prepare_suspend(void) -{ - return 0; -} - -#endif /* _ASM_SUSPEND_H */ Index: linux-2.6/arch/s390/include/asm/suspend.h =================================================================== --- linux-2.6.orig/arch/s390/include/asm/suspend.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __ASM_S390_SUSPEND_H -#define __ASM_S390_SUSPEND_H - -static inline int arch_prepare_suspend(void) -{ - return 0; -} - -#endif - Index: linux-2.6/arch/sh/include/asm/suspend.h =================================================================== --- linux-2.6.orig/arch/sh/include/asm/suspend.h +++ linux-2.6/arch/sh/include/asm/suspend.h @@ -3,7 +3,6 @@ #ifndef __ASSEMBLY__ #include -static inline int arch_prepare_suspend(void) { return 0; } #include Index: linux-2.6/arch/mips/include/asm/suspend.h =================================================================== --- linux-2.6.orig/arch/mips/include/asm/suspend.h +++ linux-2.6/arch/mips/include/asm/suspend.h @@ -1,8 +1,6 @@ #ifndef __ASM_SUSPEND_H #define __ASM_SUSPEND_H -static inline int arch_prepare_suspend(void) { return 0; } - /* References to section boundaries */ extern const void __nosave_begin, __nosave_end; Index: linux-2.6/arch/powerpc/include/asm/suspend.h =================================================================== --- linux-2.6.orig/arch/powerpc/include/asm/suspend.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_POWERPC_SUSPEND_H -#define __ASM_POWERPC_SUSPEND_H - -static inline int arch_prepare_suspend(void) { return 0; } - -#endif /* __ASM_POWERPC_SUSPEND_H */ Index: linux-2.6/arch/unicore32/include/asm/suspend.h =================================================================== --- linux-2.6.orig/arch/unicore32/include/asm/suspend.h +++ linux-2.6/arch/unicore32/include/asm/suspend.h @@ -14,7 +14,6 @@ #define __UNICORE_SUSPEND_H__ #ifndef __ASSEMBLY__ -static inline int arch_prepare_suspend(void) { return 0; } #include Index: linux-2.6/arch/x86/include/asm/suspend_32.h =================================================================== --- linux-2.6.orig/arch/x86/include/asm/suspend_32.h +++ linux-2.6/arch/x86/include/asm/suspend_32.h @@ -9,8 +9,6 @@ #include #include -static inline int arch_prepare_suspend(void) { return 0; } - /* image of the saved processor state */ struct saved_context { u16 es, fs, gs, ss; Index: linux-2.6/arch/x86/include/asm/suspend_64.h =================================================================== --- linux-2.6.orig/arch/x86/include/asm/suspend_64.h +++ linux-2.6/arch/x86/include/asm/suspend_64.h @@ -9,11 +9,6 @@ #include #include -static inline int arch_prepare_suspend(void) -{ - return 0; -} - /* * Image of the saved processor state, used by the low level ACPI suspend to * RAM code and by the low level hibernation code. Index: linux-2.6/kernel/power/hibernate.c =================================================================== --- linux-2.6.orig/kernel/power/hibernate.c +++ linux-2.6/kernel/power/hibernate.c @@ -244,10 +244,6 @@ static int create_image(int platform_mod { int error; - error = arch_prepare_suspend(); - if (error) - return error; - error = dpm_suspend_noirq(PMSG_FREEZE); if (error) { printk(KERN_ERR "PM: Some devices failed to power down, "