mn10300: Allow to pass array name to get_user()

This fixes the following compile error:

CC block/scsi_ioctl.o
block/scsi_ioctl.c: In function 'sg_scsi_ioctl':
block/scsi_ioctl.c:449: error: invalid initializer

Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
Akira Takeuchi 2013-06-28 16:53:01 +01:00 committed by David Howells
parent 98b6ed0f2b
commit c6dc9f0a4e
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ struct __large_struct { unsigned long buf[100]; };
#define __get_user_check(x, ptr, size) \ #define __get_user_check(x, ptr, size) \
({ \ ({ \
const __typeof__(ptr) __guc_ptr = (ptr); \ const __typeof__(*(ptr))* __guc_ptr = (ptr); \
int _e; \ int _e; \
if (likely(__access_ok((unsigned long) __guc_ptr, (size)))) \ if (likely(__access_ok((unsigned long) __guc_ptr, (size)))) \
_e = __get_user_nocheck((x), __guc_ptr, (size)); \ _e = __get_user_nocheck((x), __guc_ptr, (size)); \