]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/staging/csr/csr_util.h
staging: csr: remove CsrStrChr()
[karo-tx-linux.git] / drivers / staging / csr / csr_util.h
1 #ifndef CSR_UTIL_H__
2 #define CSR_UTIL_H__
3 /*****************************************************************************
4
5             (c) Cambridge Silicon Radio Limited 2010
6             All rights reserved and confidential information of CSR
7
8             Refer to LICENSE.txt included with this source for details
9             on the license terms.
10
11 *****************************************************************************/
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 #include <linux/kernel.h>
18 #include <linux/types.h>
19 #include "csr_macro.h"
20
21 /*------------------------------------------------------------------*/
22 /* Base conversion */
23 /*------------------------------------------------------------------*/
24 void CsrUInt16ToHex(u16 number, char *str);
25
26 /*------------------------------------------------------------------*/
27 /* Standard C Library functions */
28 /*------------------------------------------------------------------*/
29 #ifdef CSR_USE_STDC_LIB
30 #define CsrMemCpy memcpy
31 #define CsrStrLen strlen
32 #else /* !CSR_USE_STDC_LIB */
33 void *CsrMemCpy(void *dest, const void *src, size_t count);
34 size_t CsrStrLen(const char *string);
35 #endif /* !CSR_USE_STDC_LIB */
36 s32 CsrVsnprintf(char *string, size_t count, const char *format, va_list args);
37
38 /*------------------------------------------------------------------*/
39 /* Non-standard utility functions */
40 /*------------------------------------------------------------------*/
41 char *CsrStrDup(const char *string);
42
43 #define CsrOffsetOf(st, m)  ((size_t) & ((st *) 0)->m)
44
45 #ifdef __cplusplus
46 }
47 #endif
48
49 #endif