diff options
author | Pavel Machek <pavel@ucw.cz> | 2005-01-14 23:26:28 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-14 23:26:28 -0800 |
commit | f9adcf4ea1599e61743bccc5cabf35501e5ee51d (patch) | |
tree | 4cf5db11ac0a3edc94c35258d06eff91247334fc /arch | |
parent | 1bed67e3cbd9fa5d4bf3f3dda9dfb105e2bcea87 (diff) | |
download | history-f9adcf4ea1599e61743bccc5cabf35501e5ee51d.tar.gz |
[PATCH] swsusp: refrigerator cleanups
This patch is from Nigel's swsusp2, it kills ugly #include <suspend.h> from
all over the tree, and makes code slightly nicer. I only left those parts
that do not change any code.
From: Nigel Cunningham <ncunningham@linuxmail.org>
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/signal.c | 5 | ||||
-rw-r--r-- | arch/mips/kernel/irixsig.c | 5 | ||||
-rw-r--r-- | arch/mips/kernel/signal.c | 5 | ||||
-rw-r--r-- | arch/mips/kernel/signal32.c | 4 | ||||
-rw-r--r-- | arch/sh/kernel/signal.c | 5 | ||||
-rw-r--r-- | arch/sh64/kernel/signal.c | 4 | ||||
-rw-r--r-- | arch/x86_64/kernel/signal.c | 5 |
7 files changed, 7 insertions, 26 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index c1ff9e200266dd..ef7fa2c71284da 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -12,7 +12,6 @@ #include <linux/signal.h> #include <linux/ptrace.h> #include <linux/personality.h> -#include <linux/suspend.h> #include <asm/cacheflush.h> #include <asm/ucontext.h> @@ -689,10 +688,8 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) if (!user_mode(regs)) return 0; - if (current->flags & PF_FREEZE) { - refrigerator(0); + if (try_to_freeze(0)) goto no_signal; - } if (current->ptrace & PT_SINGLESTEP) ptrace_cancel_bpt(current); diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index a28200f3d07fb5..5ad101c0c0a2a4 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c @@ -13,7 +13,6 @@ #include <linux/smp_lock.h> #include <linux/time.h> #include <linux/ptrace.h> -#include <linux/suspend.h> #include <asm/ptrace.h> #include <asm/uaccess.h> @@ -179,10 +178,8 @@ asmlinkage int do_irix_signal(sigset_t *oldset, struct pt_regs *regs) if (!user_mode(regs)) return 1; - if (current->flags & PF_FREEZE) { - refrigerator(0); + if (try_to_freeze(0)) goto no_signal; - } if (!oldset) oldset = ¤t->blocked; diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 400363cddbbe6e..3e8e4e7e8580ae 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -18,7 +18,6 @@ #include <linux/errno.h> #include <linux/wait.h> #include <linux/ptrace.h> -#include <linux/suspend.h> #include <linux/unistd.h> #include <linux/compiler.h> @@ -577,10 +576,8 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) if (!user_mode(regs)) return 1; - if (current->flags & PF_FREEZE) { - refrigerator(0); + if (try_to_freeze(0)) goto no_signal; - } if (!oldset) oldset = ¤t->blocked; diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index c7879c225c9746..6c3d5097802cd9 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -773,10 +773,8 @@ asmlinkage int do_signal32(sigset_t *oldset, struct pt_regs *regs) if (!user_mode(regs)) return 1; - if (current->flags & PF_FREEZE) { - refrigerator(0); + if (try_to_freeze(0)) goto no_signal; - } if (!oldset) oldset = ¤t->blocked; diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c index a758053c6d19d8..cec91c6b18c858 100644 --- a/arch/sh/kernel/signal.c +++ b/arch/sh/kernel/signal.c @@ -24,7 +24,6 @@ #include <linux/tty.h> #include <linux/personality.h> #include <linux/binfmts.h> -#include <linux/suspend.h> #include <asm/ucontext.h> #include <asm/uaccess.h> @@ -579,10 +578,8 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) if (!user_mode(regs)) return 1; - if (current->flags & PF_FREEZE) { - refrigerator(0); + if (try_to_freeze(0)) goto no_signal; - } if (!oldset) oldset = ¤t->blocked; diff --git a/arch/sh64/kernel/signal.c b/arch/sh64/kernel/signal.c index a848fbdb1e4cb7..b9bb2dcc31728f 100644 --- a/arch/sh64/kernel/signal.c +++ b/arch/sh64/kernel/signal.c @@ -701,10 +701,8 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) if (!user_mode(regs)) return 1; - if (current->flags & PF_FREEZE) { - refrigerator(0); + if (try_to_freeze(0)) goto no_signal; - } if (!oldset) oldset = ¤t->blocked; diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c index ad3b240cdd9c77..1cb237ad1fcca9 100644 --- a/arch/x86_64/kernel/signal.c +++ b/arch/x86_64/kernel/signal.c @@ -24,7 +24,6 @@ #include <linux/stddef.h> #include <linux/personality.h> #include <linux/compiler.h> -#include <linux/suspend.h> #include <asm/ucontext.h> #include <asm/uaccess.h> #include <asm/i387.h> @@ -423,10 +422,8 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) return 1; } - if (current->flags & PF_FREEZE) { - refrigerator(0); + if (try_to_freeze(0)) goto no_signal; - } if (!oldset) oldset = ¤t->blocked; |