mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
	devel@driverdev.osuosl.org
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: [PATCH 3/5] staging: rtl8192su: don't use own isxdigit() method
Date: Thu, 22 Jul 2010 19:57:09 +0300	[thread overview]
Message-ID: <86c5a78d51a8d52774ad97ae2cac09d9d1ed0793.1279817399.git.andy.shevchenko@gmail.com> (raw)
In-Reply-To: <20100722151545.GA6696@suse.de>
In-Reply-To: <cover.1279817399.git.andy.shevchenko@gmail.com>

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/staging/rtl8192su/r8192S_Efuse.c |   27 +++------------------------
 1 files changed, 3 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/rtl8192su/r8192S_Efuse.c b/drivers/staging/rtl8192su/r8192S_Efuse.c
index 1e1d55e..c4bbe40 100644
--- a/drivers/staging/rtl8192su/r8192S_Efuse.c
+++ b/drivers/staging/rtl8192su/r8192S_Efuse.c
@@ -30,6 +30,7 @@
 #include "r8192S_Efuse.h"
 
 #include <linux/types.h>
+#include <linux/ctype.h>
 
 //typedef  int	INT32;
 //
@@ -1828,26 +1829,6 @@ EFUSE_ProgramMap(struct net_device* dev, char* pFileName,u8	TableType)
 
 #endif
 
-//
-//	Description:
-//		Return TRUE if chTmp is represent for hex digit and
-//		FALSE otherwise.
-//
-//
-bool IsHexDigit(	char chTmp)
-{
-	if( (chTmp >= '0' && chTmp <= '9') ||
-		(chTmp >= 'a' && chTmp <= 'f') ||
-		(chTmp >= 'A' && chTmp <= 'F') )
-	{
-		return TRUE;
-	}
-	else
-	{
-		return FALSE;
-	}
-}
-
 /*-----------------------------------------------------------------------------
  * Function:	efuse_ParsingMap
  *
@@ -1893,10 +1874,8 @@ efuse_ParsingMap(char* szStr,u32* pu4bVal,u32* pu4bMove)
 
 	// Check if szScan is now pointer to a character for hex digit,
 	// if not, it means this is not a valid hex number.
-	if(!IsHexDigit(*szScan))
-	{
+	if (!isxdigit(*szScan))
 		return FALSE;
-	}
 
 	// Parse each digit.
 	do
@@ -1905,7 +1884,7 @@ efuse_ParsingMap(char* szStr,u32* pu4bVal,u32* pu4bMove)
 
 		szScan++;
 		(*pu4bMove)++;
-	} while(IsHexDigit(*szScan));
+	} while (isxdigit(*szScan));
 
 	return TRUE;
 
-- 
1.7.1.1


  parent reply	other threads:[~2010-07-22 16:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-22 13:24 [PATCH] staging: clean up code a bit, use kernel native methods Andy Shevchenko
2010-07-22 15:15 ` Greg KH
2010-07-22 16:57   ` [PATCH 0/5] " Andy Shevchenko
2010-07-22 16:57     ` [PATCH 1/5] staging: remove unused methods Andy Shevchenko
2010-07-22 16:57     ` [PATCH 2/5] staging: panel: change own pieces of code by strtoul() Andy Shevchenko
2010-07-22 16:57     ` Andy Shevchenko [this message]
2010-07-22 16:57     ` [PATCH 4/5] staging: wlags49_h2: remove custom hex_to_bin() method Andy Shevchenko
2010-07-22 16:57     ` [PATCH 5/5] staging: wlan-ng: remove own bin2hex converter Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86c5a78d51a8d52774ad97ae2cac09d9d1ed0793.1279817399.git.andy.shevchenko@gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®