summaryrefslogtreecommitdiff
path: root/drivers/staging/csr/csr_util.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 19:00:10 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 19:00:10 (GMT)
commit8c87f69acf942222d8e2ead6d0ca144957141284 (patch)
tree3efb5fee94255eccc259f35efb71cb5202d4b271 /drivers/staging/csr/csr_util.c
parent163eb0d85294e08b686d453744ca95e5f583e7db (diff)
downloadlinux-fsl-qoriq-8c87f69acf942222d8e2ead6d0ca144957141284.tar.xz
staging: csr: remove CsrUint16 typedef
Use the in-kernel u16 type instead. 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_util.c')
-rw-r--r--drivers/staging/csr/csr_util.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/staging/csr/csr_util.c b/drivers/staging/csr/csr_util.c
index 83721fe..32c114b 100644
--- a/drivers/staging/csr/csr_util.c
+++ b/drivers/staging/csr/csr_util.c
@@ -55,7 +55,7 @@ u8 CsrBitCountDense(CsrUint32 n)
/*------------------------------------------------------------------*/
CsrBool CsrHexStrToUint8(const CsrCharString *string, u8 *returnValue)
{
- CsrUint16 currentIndex = 0;
+ u16 currentIndex = 0;
*returnValue = 0;
if ((string[currentIndex] == '0') && (CSR_TOUPPER(string[currentIndex + 1]) == 'X'))
{
@@ -77,9 +77,9 @@ CsrBool CsrHexStrToUint8(const CsrCharString *string, u8 *returnValue)
return FALSE;
}
-CsrBool CsrHexStrToUint16(const CsrCharString *string, CsrUint16 *returnValue)
+CsrBool CsrHexStrToUint16(const CsrCharString *string, u16 *returnValue)
{
- CsrUint16 currentIndex = 0;
+ u16 currentIndex = 0;
*returnValue = 0;
if ((string[currentIndex] == '0') && (CSR_TOUPPER(string[currentIndex + 1]) == 'X'))
{
@@ -89,7 +89,7 @@ CsrBool CsrHexStrToUint16(const CsrCharString *string, CsrUint16 *returnValue)
{
while (((string[currentIndex] >= '0') && (string[currentIndex] <= '9')) || ((CSR_TOUPPER(string[currentIndex]) >= 'A') && (CSR_TOUPPER(string[currentIndex]) <= 'F')))
{
- *returnValue = (CsrUint16) (*returnValue * 16 + (((string[currentIndex] >= '0') && (string[currentIndex] <= '9')) ? string[currentIndex] - '0' : CSR_TOUPPER(string[currentIndex]) - 'A' + 10));
+ *returnValue = (u16) (*returnValue * 16 + (((string[currentIndex] >= '0') && (string[currentIndex] <= '9')) ? string[currentIndex] - '0' : CSR_TOUPPER(string[currentIndex]) - 'A' + 10));
currentIndex++;
if (currentIndex >= 4)
{
@@ -103,7 +103,7 @@ CsrBool CsrHexStrToUint16(const CsrCharString *string, CsrUint16 *returnValue)
CsrBool CsrHexStrToUint32(const CsrCharString *string, CsrUint32 *returnValue)
{
- CsrUint16 currentIndex = 0;
+ u16 currentIndex = 0;
*returnValue = 0;
if ((string[currentIndex] == '0') && (CSR_TOUPPER(string[currentIndex + 1]) == 'X'))
{
@@ -190,14 +190,14 @@ void CsrIntToBase10(CsrInt32 number, CsrCharString *str)
CsrStrCpy(str, res);
}
-void CsrUInt16ToHex(CsrUint16 number, CsrCharString *str)
+void CsrUInt16ToHex(u16 number, CsrCharString *str)
{
- CsrUint16 index;
- CsrUint16 currentValue;
+ u16 index;
+ u16 currentValue;
for (index = 0; index < 4; index++)
{
- currentValue = (CsrUint16) (number & 0x000F);
+ currentValue = (u16) (number & 0x000F);
number >>= 4;
str[3 - index] = (char) (currentValue > 9 ? currentValue + 55 : currentValue + '0');
}
@@ -206,7 +206,7 @@ void CsrUInt16ToHex(CsrUint16 number, CsrCharString *str)
void CsrUInt32ToHex(CsrUint32 number, CsrCharString *str)
{
- CsrUint16 index;
+ u16 index;
CsrUint32 currentValue;
for (index = 0; index < 8; index++)
@@ -334,7 +334,7 @@ CsrUint32 CsrStrToInt(const CsrCharString *str)
digit = 1;
/* Start from the string end */
- for (i = (CsrUint16) (CsrStrLen(str) - 1); i >= 0; i--)
+ for (i = (u16) (CsrStrLen(str) - 1); i >= 0; i--)
{
/* Only convert numbers */
if ((str[i] >= '0') && (str[i] <= '9'))