diff options
| author | Ingo Molnar <mingo@kernel.org> | 2012-03-26 17:18:44 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2012-03-26 17:19:03 +0200 |
| commit | 7fd52392c56361a40f0c630a82b36b95ca31eac6 (patch) | |
| tree | 14091de24c6b28ea4cae9826f98aeedb7be091f5 /tools/usb/ffs-test.c | |
| parent | b01c3a0010aabadf745f3e7fdb9cab682e0a28a2 (diff) | |
| parent | e22057c8599373e5caef0bc42bdb95d2a361ab0d (diff) | |
Merge branch 'linus' into perf/urgent
Merge reason: we need to fix a non-trivial merge conflict.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/usb/ffs-test.c')
| -rw-r--r-- | tools/usb/ffs-test.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/tools/usb/ffs-test.c b/tools/usb/ffs-test.c index b9c79863169..4b107b5e623 100644 --- a/tools/usb/ffs-test.c +++ b/tools/usb/ffs-test.c @@ -2,7 +2,7 @@ * ffs-test.c.c -- user mode filesystem api for usb composite function * * Copyright (C) 2010 Samsung Electronics - * Author: Michal Nazarewicz <m.nazarewicz@samsung.com> + * Author: Michal Nazarewicz <mina86@mina86.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,6 +36,7 @@ #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> +#include <tools/le_byteshift.h> #include "../../include/linux/usb/functionfs.h" @@ -47,34 +48,6 @@ #define le32_to_cpu(x) le32toh(x) #define le16_to_cpu(x) le16toh(x) -static inline __u16 get_unaligned_le16(const void *_ptr) -{ - const __u8 *ptr = _ptr; - return ptr[0] | (ptr[1] << 8); -} - -static inline __u32 get_unaligned_le32(const void *_ptr) -{ - const __u8 *ptr = _ptr; - return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24); -} - -static inline void put_unaligned_le16(__u16 val, void *_ptr) -{ - __u8 *ptr = _ptr; - *ptr++ = val; - *ptr++ = val >> 8; -} - -static inline void put_unaligned_le32(__u32 val, void *_ptr) -{ - __u8 *ptr = _ptr; - *ptr++ = val; - *ptr++ = val >> 8; - *ptr++ = val >> 16; - *ptr++ = val >> 24; -} - /******************** Messages and Errors ***********************************/ |
