aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/uaccess.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-23 17:13:43 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-23 17:13:43 -0500
commit88e3c1da8b3258a81c5c81d4e7e22557b7d71ba7 (patch)
treeab518773c0ff4606f1a57d00b5931332a7e1d96e /include/asm-i386/uaccess.h
parentfa4fa40a990f8f4eff65476bef32007c154bbac0 (diff)
parentb0e6e962992b76580f4900b166a337bad7c1e81b (diff)
Merge branch 'master'
Diffstat (limited to 'include/asm-i386/uaccess.h')
-rw-r--r--include/asm-i386/uaccess.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h
index 3f1337c34208..371457b1ceb6 100644
--- a/include/asm-i386/uaccess.h
+++ b/include/asm-i386/uaccess.h
@@ -197,13 +197,15 @@ extern void __put_user_8(void);
197 197
198#define put_user(x,ptr) \ 198#define put_user(x,ptr) \
199({ int __ret_pu; \ 199({ int __ret_pu; \
200 __typeof__(*(ptr)) __pu_val; \
200 __chk_user_ptr(ptr); \ 201 __chk_user_ptr(ptr); \
202 __pu_val = x; \
201 switch(sizeof(*(ptr))) { \ 203 switch(sizeof(*(ptr))) { \
202 case 1: __put_user_1(x, ptr); break; \ 204 case 1: __put_user_1(__pu_val, ptr); break; \
203 case 2: __put_user_2(x, ptr); break; \ 205 case 2: __put_user_2(__pu_val, ptr); break; \
204 case 4: __put_user_4(x, ptr); break; \ 206 case 4: __put_user_4(__pu_val, ptr); break; \
205 case 8: __put_user_8(x, ptr); break; \ 207 case 8: __put_user_8(__pu_val, ptr); break; \
206 default:__put_user_X(x, ptr); break; \ 208 default:__put_user_X(__pu_val, ptr); break; \
207 } \ 209 } \
208 __ret_pu; \ 210 __ret_pu; \
209}) 211})