]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/fpu.h
backlight: Clean up pmac_backlight handling
[linux-2.6-omap-h63xx.git] / include / asm-mips / fpu.h
index b0f50015e25253688fd24e6154f48d70710d5fa3..efef843b93f0c1694a2084f1a502523a5ac69318 100644 (file)
@@ -10,7 +10,6 @@
 #ifndef _ASM_FPU_H
 #define _ASM_FPU_H
 
-#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/thread_info.h>
 
@@ -135,13 +134,14 @@ static inline void restore_fp(struct task_struct *tsk)
 
 static inline fpureg_t *get_fpu_regs(struct task_struct *tsk)
 {
-       if (cpu_has_fpu) {
-               if ((tsk == current) && __is_fpu_owner())
+       if (tsk == current) {
+               preempt_disable();
+               if (is_fpu_owner())
                        _save_fp(current);
-               return tsk->thread.fpu.hard.fpr;
+               preempt_enable();
        }
 
-       return tsk->thread.fpu.soft.fpr;
+       return tsk->thread.fpu.fpr;
 }
 
 #endif /* _ASM_FPU_H */