aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 14:25:50 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 14:25:50 -0400
commitca6d25029a5ecc9f1f3497537eafa8557e9cfdab (patch)
treec7cb0fbf44eaef6eecc345efc6c68813a0a26263 /drivers
parent22c45f0b3502ddd48637b4b2f65036fbe0868622 (diff)
staging: csr: clean up csr_types.h a bit
Remove the floating point variables and the sections that are not being built if the code isn't in the kernel. Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@bluegiga.com> Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/csr/csr_types.h25
1 files changed, 1 insertions, 24 deletions
diff --git a/drivers/staging/csr/csr_types.h b/drivers/staging/csr/csr_types.h
index 23193ea4429..e736a78da43 100644
--- a/drivers/staging/csr/csr_types.h
+++ b/drivers/staging/csr/csr_types.h
@@ -10,19 +10,11 @@
10 10
11*****************************************************************************/ 11*****************************************************************************/
12 12
13#ifdef __KERNEL__
14#include <linux/stddef.h> 13#include <linux/stddef.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <asm/byteorder.h>
18#include <linux/string.h> 16#include <linux/string.h>
19#else 17#include <asm/byteorder.h>
20#include <stdint.h>
21#include <stddef.h>
22#include <sys/types.h>
23#include <stdarg.h>
24#include <string.h>
25#endif
26 18
27#ifdef __cplusplus 19#ifdef __cplusplus
28extern "C" { 20extern "C" {
@@ -38,11 +30,7 @@ extern "C" {
38typedef size_t CsrSize; /* Return type of sizeof (ISO/IEC 9899:1990 7.1.6) */ 30typedef size_t CsrSize; /* Return type of sizeof (ISO/IEC 9899:1990 7.1.6) */
39typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointers (ISO/IEC 9899:1990 7.1.6) */ 31typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointers (ISO/IEC 9899:1990 7.1.6) */
40typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */ 32typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
41#ifdef __KERNEL__
42typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */ 33typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */
43#else
44typedef intptr_t CsrIntptr; /* Signed integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
45#endif
46 34
47/* Unsigned fixed width types */ 35/* Unsigned fixed width types */
48typedef uint8_t CsrUint8; 36typedef uint8_t CsrUint8;
@@ -75,17 +63,6 @@ typedef CsrUint32 CsrUint24;
75typedef uint64_t CsrUint64; 63typedef uint64_t CsrUint64;
76typedef int64_t CsrInt64; 64typedef int64_t CsrInt64;
77 65
78/*
79 * Floating point
80 *
81 * Note: If a given compiler does not support floating point, it is
82 * OK to omit these definitions; alternative versions of the code using
83 * these types may be available. Consult the relevant documentation
84 * or the customer support group for information on this.
85 */
86#define CSR_HAVE_FLOATING_POINT
87typedef float CsrFloat;
88typedef double CsrDouble;
89 66
90#ifdef __cplusplus 67#ifdef __cplusplus
91} 68}