summaryrefslogtreecommitdiffstats
path: root/drivers/staging/csr/csr_serialize_primitive_types.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 17:04:08 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 17:04:08 -0700
commit9e16d457689d1b866e8c1b7de331cb069e341f4c (patch)
treed494bf6412ec69bce2d903a799bfa482e117229e /drivers/staging/csr/csr_serialize_primitive_types.c
parenteaae2e9223e859cd968b58bd3173a3f17b50538d (diff)
downloadop-kernel-dev-9e16d457689d1b866e8c1b7de331cb069e341f4c.zip
op-kernel-dev-9e16d457689d1b866e8c1b7de331cb069e341f4c.tar.gz
staging: csr: remove csr_utf16.c
Only one function was being used in the file, so move it to where it was being called and delete the rest of the file, and csr_unicode.h as it's no longer needed as well. 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/staging/csr/csr_serialize_primitive_types.c')
-rw-r--r--drivers/staging/csr/csr_serialize_primitive_types.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/staging/csr/csr_serialize_primitive_types.c b/drivers/staging/csr/csr_serialize_primitive_types.c
index 39406fd..a6f29ea 100644
--- a/drivers/staging/csr/csr_serialize_primitive_types.c
+++ b/drivers/staging/csr/csr_serialize_primitive_types.c
@@ -15,6 +15,34 @@
#include "csr_macro.h"
#include "csr_lib.h"
+/********************************************************************************
+*
+* Name: CsrUtf16StrLen
+*
+* Description: The function returns the number of 16 bit elements present
+* in the 0-terminated string.
+*
+* Input: 0-terminated string of 16 bit unicoded characters.
+*
+* Output: The number of 16 bit elements in the string.
+*
+*********************************************************************************/
+static u32 CsrUtf16StrLen(const u16 *unicodeString)
+{
+ u32 length;
+
+ length = 0;
+ if (unicodeString != NULL)
+ {
+ while (*unicodeString)
+ {
+ length++;
+ unicodeString++;
+ }
+ }
+ return length;
+}
+
void CsrUint8Des(u8 *value, u8 *buffer, size_t *offset)
{
*value = buffer[*offset];
OpenPOWER on IntegriCloud