This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / include / asm-mips / compat.h
index 38b2116..88ca4d5 100644 (file)
@@ -132,10 +132,10 @@ static inline void *compat_ptr(compat_uptr_t uptr)
 
 static inline void *compat_alloc_user_space(long len)
 {
-       struct pt_regs *regs = (struct pt_regs *)
-               ((unsigned long) current_thread_info() + THREAD_SIZE - 32) - 1;
+       unsigned long sp = (unsigned long) current_thread_info() +
+                           THREAD_SIZE - 32;
 
-       return (void *) (regs->regs[29] - len);
+       return (void *) (sp - len);
 }
 
 #endif /* _ASM_COMPAT_H */