]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/staging/csr/csr_serialize_primitive_types.c
staging: csr: remove csr_utf16.c
[karo-tx-linux.git] / drivers / staging / csr / csr_serialize_primitive_types.c
index 39406fd1f1a1b776aaa3cde79359b0517642c9dc..a6f29ea36d200cf2075841f9ebbdd0c97f96abe1 100644 (file)
 #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];