From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linux PM mailing list <linux-pm@lists.linux-foundation.org>
Cc: Frank Hofmann <frank.hofmann@tomtom.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-sh@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: [PATCH 2/3] PM / Hibernate: Remove arch_prepare_suspend()
Date: Sat, 21 May 2011 14:10:34 +0200 [thread overview]
Message-ID: <201105211410.34491.rjw@sisk.pl> (raw)
In-Reply-To: <201105211408.28671.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
All architectures supporting hibernation define
arch_prepare_suspend() as an empty function, so remove it.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
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 <linux/notifier.h>
-static inline int arch_prepare_suspend(void) { return 0; }
#include <asm/ptrace.h>
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 <asm/ptrace.h>
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 <asm/desc.h>
#include <asm/i387.h>
-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 <asm/desc.h>
#include <asm/i387.h>
-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, "
next prev parent reply other threads:[~2011-05-21 12:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-21 12:08 [PATCH 0/3] Hibernate cleanups Rafael J. Wysocki
2011-05-21 12:09 ` [PATCH 1/3] PM / Hibernate: Update some comments in core hibernate code Rafael J. Wysocki
2011-05-21 12:10 ` Rafael J. Wysocki [this message]
2011-06-02 3:14 ` [PATCH 2/3] PM / Hibernate: Remove arch_prepare_suspend() Pavel Machek
2011-06-06 13:49 ` Ralf Baechle
2011-05-21 12:12 ` [PATCH 3/3] PM / Hibernate: Update kerneldoc comments in hibernate.c Rafael J. Wysocki
2011-05-23 3:08 ` Randy Dunlap
2011-05-23 21:11 ` Rafael J. Wysocki
2011-05-23 21:34 ` Randy Dunlap
2011-05-24 12:35 ` [PATCH 0/3] Hibernate cleanups Frank Hofmann
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=201105211410.34491.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=benh@kernel.crashing.org \
--cc=frank.hofmann@tomtom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-sh@vger.kernel.org \
--cc=ralf@linux-mips.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