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 1/2] staging: rtl8712: throw away custom hex_to_bin()
Date: Tue, 7 Sep 2010 18:20:21 +0300 [thread overview]
Message-ID: <09b7da2e5462e0b855617ff5308ed6efb4fc9cab.1283872748.git.andy.shevchenko@gmail.com> (raw)
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 1529239..eac049b 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -62,17 +62,6 @@ static const char * const iw_operation_mode[] = {
"Monitor"
};
-static int hex2num_i(char c)
-{
- if (c >= '0' && c <= '9')
- return c - '0';
- if (c >= 'a' && c <= 'f')
- return c - 'a' + 10;
- if (c >= 'A' && c <= 'F')
- return c - 'A' + 10;
- return -1;
-}
-
/**
* hwaddr_aton - Convert ASCII string to MAC address
* @txt: MAC address as a string (e.g., "00:11:22:33:44:55")
@@ -86,10 +75,10 @@ static int hwaddr_aton_i(const char *txt, u8 *addr)
for (i = 0; i < 6; i++) {
int a, b;
- a = hex2num_i(*txt++);
+ a = hex_to_bin(*txt++);
if (a < 0)
return -1;
- b = hex2num_i(*txt++);
+ b = hex_to_bin(*txt++);
if (b < 0)
return -1;
*addr++ = (a << 4) | b;
--
1.7.2.2
next reply other threads:[~2010-09-07 15:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 15:20 Andy Shevchenko [this message]
2010-09-07 15:20 ` [PATCH 2/2] staging: ath6kl: use native methods from kernel library Andy Shevchenko
2010-09-07 21:18 ` Vipin Mehta
2010-09-07 22:26 ` Andy Shevchenko
2010-09-08 0:03 ` Greg KH
2010-09-08 2:29 ` Vipin Mehta
2010-09-08 7:08 ` Greg KH
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=09b7da2e5462e0b855617ff5308ed6efb4fc9cab.1283872748.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®