Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318172
b: refs/heads/master
c: 5a0c09f
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jul 20, 2012
1 parent 530cea3 commit 99de628
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 48 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6a4f6d38a34a992f8fd1572fc8d5706c11089d5e
refs/heads/master: 5a0c09fd736d2518409e0eabe4c3039058e6fdfc
4 changes: 2 additions & 2 deletions trunk/drivers/staging/csr/csr_serialize_primitive_types.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ EXPORT_SYMBOL_GPL(CsrMemCpyDes);

void CsrCharStringDes(char **value, u8 *buffer, size_t *offset)
{
*value = CsrStrDup((char *) &buffer[*offset]);
*value = kstrdup((char *) &buffer[*offset], GFP_KERNEL);
*offset += CsrStrLen(*value) + 1;
}
EXPORT_SYMBOL_GPL(CsrCharStringDes);

void CsrUtf8StringDes(u8 **value, u8 *buffer, size_t *offset)
{
*value = (u8 *) CsrStrDup((char *) &buffer[*offset]);
*value = (u8 *)kstrdup((char *) &buffer[*offset], GFP_KERNEL);
*offset += CsrStrLen((char *) *value) + 1;
}

Expand Down
20 changes: 0 additions & 20 deletions trunk/drivers/staging/csr/csr_unicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,6 @@ u32 CsrUtf8StringLengthInBytes(const u8 *string);
*******************************************************************************/
u8 *CsrUtf8StrTruncate(u8 *target, size_t count);

/*******************************************************************************
NAME
CsrUtf8StrDup
DESCRIPTION
This function will allocate memory and copy the source string into the
allocated memory, which is then returned as a duplicate of the original
string. The memory returned must be freed by calling CsrPmemFree when
the duplicate is no longer needed.
PARAMETERS
source - UTF-8 string to be duplicated.
RETURNS
Returns a duplicate of source.
*******************************************************************************/
u8 *CsrUtf8StrDup(const u8 *source);

/*
* UCS2
*
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/staging/csr/csr_utf16.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,8 +1053,3 @@ u8 *CsrUtf8StrTruncate(u8 *target, size_t count)

return target;
}

u8 *CsrUtf8StrDup(const u8 *source)
{
return (u8 *) CsrStrDup((const char *) source);
}
15 changes: 0 additions & 15 deletions trunk/drivers/staging/csr/csr_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,6 @@ s32 CsrVsnprintf(char *string, size_t count, const char *format, va_list args)
}
EXPORT_SYMBOL_GPL(CsrVsnprintf);

char *CsrStrDup(const char *string)
{
char *copy;
u32 len;

copy = NULL;
if (string != NULL)
{
len = CsrStrLen(string) + 1;
copy = CsrPmemAlloc(len);
CsrMemCpy(copy, string, len);
}
return copy;
}

MODULE_DESCRIPTION("CSR Operating System Kernel Abstraction");
MODULE_AUTHOR("Cambridge Silicon Radio Ltd.");
MODULE_LICENSE("GPL and additional rights");
5 changes: 0 additions & 5 deletions trunk/drivers/staging/csr/csr_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ size_t CsrStrLen(const char *string);
#endif /* !CSR_USE_STDC_LIB */
s32 CsrVsnprintf(char *string, size_t count, const char *format, va_list args);

/*------------------------------------------------------------------*/
/* Non-standard utility functions */
/*------------------------------------------------------------------*/
char *CsrStrDup(const char *string);

#define CsrOffsetOf(st, m) ((size_t) & ((st *) 0)->m)

#ifdef __cplusplus
Expand Down

0 comments on commit 99de628

Please sign in to comment.