summaryrefslogtreecommitdiff
path: root/drivers/staging/csr/csr_util.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 18:51:01 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 18:51:01 (GMT)
commit7e6f57944cb508fc426bce20cc2838fbe9d95654 (patch)
treebb9e37cf84642fd07bee18f11b29657d0d40f0cd /drivers/staging/csr/csr_util.c
parentca6d25029a5ecc9f1f3497537eafa8557e9cfdab (diff)
downloadlinux-fsl-qoriq-7e6f57944cb508fc426bce20cc2838fbe9d95654.tar.xz
staging: csr: remove CsrUint8 typedef
Use the in-kernel u8 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.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/csr/csr_util.c b/drivers/staging/csr/csr_util.c
index ee2d047..83721fe 100644
--- a/drivers/staging/csr/csr_util.c
+++ b/drivers/staging/csr/csr_util.c
@@ -21,9 +21,9 @@
/*------------------------------------------------------------------*/
/* Time proportional with the number of 1's */
-CsrUint8 CsrBitCountSparse(CsrUint32 n)
+u8 CsrBitCountSparse(CsrUint32 n)
{
- CsrUint8 count = 0;
+ u8 count = 0;
while (n)
{
@@ -35,9 +35,9 @@ CsrUint8 CsrBitCountSparse(CsrUint32 n)
}
/* Time proportional with the number of 0's */
-CsrUint8 CsrBitCountDense(CsrUint32 n)
+u8 CsrBitCountDense(CsrUint32 n)
{
- CsrUint8 count = 8 * sizeof(CsrUint32);
+ u8 count = 8 * sizeof(CsrUint32);
n ^= (CsrUint32) (-1);
@@ -53,7 +53,7 @@ CsrUint8 CsrBitCountDense(CsrUint32 n)
/*------------------------------------------------------------------*/
/* Base conversion */
/*------------------------------------------------------------------*/
-CsrBool CsrHexStrToUint8(const CsrCharString *string, CsrUint8 *returnValue)
+CsrBool CsrHexStrToUint8(const CsrCharString *string, u8 *returnValue)
{
CsrUint16 currentIndex = 0;
*returnValue = 0;
@@ -65,7 +65,7 @@ CsrBool CsrHexStrToUint8(const CsrCharString *string, CsrUint8 *returnValue)
{
while (((string[currentIndex] >= '0') && (string[currentIndex] <= '9')) || ((CSR_TOUPPER(string[currentIndex]) >= 'A') && (CSR_TOUPPER(string[currentIndex]) <= 'F')))
{
- *returnValue = (CsrUint8) (*returnValue * 16 + (((string[currentIndex] >= '0') && (string[currentIndex] <= '9')) ? string[currentIndex] - '0' : CSR_TOUPPER(string[currentIndex]) - 'A' + 10));
+ *returnValue = (u8) (*returnValue * 16 + (((string[currentIndex] >= '0') && (string[currentIndex] <= '9')) ? string[currentIndex] - '0' : CSR_TOUPPER(string[currentIndex]) - 'A' + 10));
currentIndex++;
if (currentIndex >= 2)
{
@@ -148,7 +148,7 @@ CsrUint32 CsrPow(CsrUint32 base, CsrUint32 exponent)
void CsrIntToBase10(CsrInt32 number, CsrCharString *str)
{
CsrInt32 digit;
- CsrUint8 index;
+ u8 index;
CsrCharString res[I2B10_MAX];
CsrBool foundDigit = FALSE;
@@ -228,7 +228,7 @@ void *CsrMemCpy(void *dest, const void *src, CsrSize count)
}
EXPORT_SYMBOL_GPL(CsrMemCpy);
-void *CsrMemSet(void *dest, CsrUint8 c, CsrSize count)
+void *CsrMemSet(void *dest, u8 c, CsrSize count)
{
return memset(dest, c, count);
}
@@ -423,7 +423,7 @@ const CsrCharString *CsrGetBaseName(const CsrCharString *file)
/*------------------------------------------------------------------*/
/* Misc */
/*------------------------------------------------------------------*/
-CsrBool CsrIsSpace(CsrUint8 c)
+CsrBool CsrIsSpace(u8 c)
{
switch (c)
{