aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <ext-andriy.shevchenko@nokia.com>2010-05-24 17:33:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-25 11:07:05 -0400
commit1356de06cea80ffc84cde6a4f8779414f20f211e (patch)
tree2c39819abf41a97fd332f9e77df8fd5a3c3b5f23
parent69e4469a39b67e9923731d5d77d45c04837d5def (diff)
staging: rt2860: use new hex_to_bin() method
Instead of using own implementation involve hex_to_bin() function. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/staging/rt2860/common/rtmp_init.c15
-rw-r--r--drivers/staging/rt2860/rtmp.h2
2 files changed, 2 insertions, 15 deletions
diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c
index 21a95ffdfb86..a09038542f26 100644
--- a/drivers/staging/rt2860/common/rtmp_init.c
+++ b/drivers/staging/rt2860/common/rtmp_init.c
@@ -2810,17 +2810,6 @@ void UserCfgInit(struct rt_rtmp_adapter *pAd)
2810} 2810}
2811 2811
2812/* IRQL = PASSIVE_LEVEL */ 2812/* IRQL = PASSIVE_LEVEL */
2813u8 BtoH(char ch)
2814{
2815 if (ch >= '0' && ch <= '9')
2816 return (ch - '0'); /* Handle numerals */
2817 if (ch >= 'A' && ch <= 'F')
2818 return (ch - 'A' + 0xA); /* Handle capitol hex digits */
2819 if (ch >= 'a' && ch <= 'f')
2820 return (ch - 'a' + 0xA); /* Handle small hex digits */
2821 return (255);
2822}
2823
2824/* */ 2813/* */
2825/* FUNCTION: AtoH(char *, u8 *, int) */ 2814/* FUNCTION: AtoH(char *, u8 *, int) */
2826/* */ 2815/* */
@@ -2847,8 +2836,8 @@ void AtoH(char *src, u8 *dest, int destlen)
2847 destTemp = (u8 *)dest; 2836 destTemp = (u8 *)dest;
2848 2837
2849 while (destlen--) { 2838 while (destlen--) {
2850 *destTemp = BtoH(*srcptr++) << 4; /* Put 1st ascii byte in upper nibble. */ 2839 *destTemp = hex_to_bin(*srcptr++) << 4; /* Put 1st ascii byte in upper nibble. */
2851 *destTemp += BtoH(*srcptr++); /* Add 2nd ascii byte to above. */ 2840 *destTemp += hex_to_bin(*srcptr++); /* Add 2nd ascii byte to above. */
2852 destTemp++; 2841 destTemp++;
2853 } 2842 }
2854} 2843}
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
index ab525ee15042..82b6e783b33f 100644
--- a/drivers/staging/rt2860/rtmp.h
+++ b/drivers/staging/rt2860/rtmp.h
@@ -2356,8 +2356,6 @@ void RTMPMoveMemory(void *pDest, void *pSrc, unsigned long Length);
2356 2356
2357void AtoH(char *src, u8 *dest, int destlen); 2357void AtoH(char *src, u8 *dest, int destlen);
2358 2358
2359u8 BtoH(char ch);
2360
2361void RTMPPatchMacBbpBug(struct rt_rtmp_adapter *pAd); 2359void RTMPPatchMacBbpBug(struct rt_rtmp_adapter *pAd);
2362 2360
2363void RTMPInitTimer(struct rt_rtmp_adapter *pAd, 2361void RTMPInitTimer(struct rt_rtmp_adapter *pAd,