]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-h8300/uaccess.h
dev_name introduction fall out fix
[linux-2.6-omap-h63xx.git] / include / asm-h8300 / uaccess.h
index 1480f307a4749f69e1199da2c03c1b41410084d4..356068cd0879bdf145bd68f12857b75cfd95ab4c 100644 (file)
@@ -24,12 +24,6 @@ static inline int __access_ok(unsigned long addr, unsigned long size)
        return(RANGE_CHECK_OK(addr, size, 0L, (unsigned long)&_ramend));
 }
 
-/* this function will go away soon - use access_ok() instead */
-static inline int __deprecated verify_area(int type, const void *addr, unsigned long size)
-{
-       return access_ok(type,addr,size)?0:-EFAULT;
-}
-
 /*
  * The exception table consists of pairs of addresses: the first is the
  * address of an instruction that is allowed to fault, and the second is
@@ -97,19 +91,16 @@ extern int __put_user_bad(void);
 #define get_user(x, ptr)                                       \
 ({                                                             \
     int __gu_err = 0;                                          \
-    typeof(*(ptr)) __gu_val = 0;                               \
+    typeof(*(ptr)) __gu_val = *ptr;                            \
     switch (sizeof(*(ptr))) {                                  \
     case 1:                                                    \
     case 2:                                                    \
     case 4:                                                    \
-       __gu_val = *(ptr);                                      \
-       break;                                                  \
-    case 8:                                                    \
-       memcpy(&__gu_val, ptr, sizeof (*(ptr)));                \
+    case 8:                                                    \
        break;                                                  \
     default:                                                   \
-       __gu_val = 0;                                           \
        __gu_err = __get_user_bad();                            \
+       __gu_val = 0;                                           \
        break;                                                  \
     }                                                          \
     (x) = __gu_val;                                            \