[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <09b7da2e5462e0b855617ff5308ed6efb4fc9cab.1283872748.git.andy.shevchenko@gmail.com>
Date: Tue, 7 Sep 2010 18:20:21 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: linux-kernel@...r.kernel.org, Greg Kroah-Hartman <gregkh@...e.de>,
devel@...verdev.osuosl.org
Cc: Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH 1/2] staging: rtl8712: throw away custom hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists