From 2844b660358c9230a2e85a0218f0df4046d5c392 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Fri, 6 Feb 2009 14:54:08 +1000 Subject: m68k: merge the mmu and non-mmu versions of current.h Trivial merge of the mmu and non-mmu versions of current.h Signed-off-by: Greg Ungerer Acked-by: Geert Uytterhoeven --- arch/m68k/include/asm/current.h | 31 +++++++++++++++++++++++++++---- arch/m68k/include/asm/current_mm.h | 6 ------ arch/m68k/include/asm/current_no.h | 24 ------------------------ 3 files changed, 27 insertions(+), 34 deletions(-) delete mode 100644 arch/m68k/include/asm/current_mm.h delete mode 100644 arch/m68k/include/asm/current_no.h (limited to 'arch/m68k') diff --git a/arch/m68k/include/asm/current.h b/arch/m68k/include/asm/current.h index 51b056dfaed..91fcc5358cf 100644 --- a/arch/m68k/include/asm/current.h +++ b/arch/m68k/include/asm/current.h @@ -1,5 +1,28 @@ -#ifdef __uClinux__ -#include "current_no.h" +#ifndef _M68K_CURRENT_H +#define _M68K_CURRENT_H + +#ifdef CONFIG_MMU + +register struct task_struct *current __asm__("%a2"); + #else -#include "current_mm.h" -#endif + +/* + * Rather than dedicate a register (as the m68k source does), we + * just keep a global, we should probably just change it all to be + * current and lose _current_task. + */ +#include + +struct task_struct; + +static inline struct task_struct *get_current(void) +{ + return(current_thread_info()->task); +} + +#define current get_current() + +#endif /* CONFNIG_MMU */ + +#endif /* !(_M68K_CURRENT_H) */ diff --git a/arch/m68k/include/asm/current_mm.h b/arch/m68k/include/asm/current_mm.h deleted file mode 100644 index 8de8f8ceda6..00000000000 --- a/arch/m68k/include/asm/current_mm.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _M68K_CURRENT_H -#define _M68K_CURRENT_H - -register struct task_struct *current __asm__("%a2"); - -#endif /* !(_M68K_CURRENT_H) */ diff --git a/arch/m68k/include/asm/current_no.h b/arch/m68k/include/asm/current_no.h deleted file mode 100644 index 53ee0f9f7ce..00000000000 --- a/arch/m68k/include/asm/current_no.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _M68KNOMMU_CURRENT_H -#define _M68KNOMMU_CURRENT_H -/* - * current.h - * (C) Copyright 2000, Lineo, David McCullough - * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) - * - * rather than dedicate a register (as the m68k source does), we - * just keep a global, we should probably just change it all to be - * current and lose _current_task. - */ - -#include - -struct task_struct; - -static inline struct task_struct *get_current(void) -{ - return(current_thread_info()->task); -} - -#define current get_current() - -#endif /* _M68KNOMMU_CURRENT_H */ -- cgit v1.2.3