Merge branch 'intelfb-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[pandora-kernel.git] / include / asm-v850 / unistd.h
index bcb44bf..552b7c8 100644 (file)
 #ifdef __KERNEL__
 
 #include <asm/clinkage.h>
+#include <linux/err.h>
 
 #define __syscall_return(type, res)                                          \
   do {                                                                       \
-         /* user-visible error numbers are in the range -1 - -124:           \
+         /* user-visible error numbers are in the range -1 - -MAX_ERRNO:      \
             see <asm-v850/errno.h> */                                        \
-         if (__builtin_expect ((unsigned long)(res) >= (unsigned long)(-125), 0)) { \
+         if (__builtin_expect ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO), 0)) { \
                  errno = -(res);                                             \
                  res = -1;                                                   \
          }                                                                   \