Commit c9ff921a authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Takashi Iwai

ALSA: alsa: riptide: don't use own hex_to_bin() method

Signed-off-by: default avatarAndy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent bcfde334
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
#include <linux/gameport.h> #include <linux/gameport.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/firmware.h> #include <linux/firmware.h>
#include <linux/kernel.h>
#include <asm/io.h> #include <asm/io.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/info.h> #include <sound/info.h>
...@@ -667,13 +668,12 @@ static u32 atoh(const unsigned char *in, unsigned int len) ...@@ -667,13 +668,12 @@ static u32 atoh(const unsigned char *in, unsigned int len)
unsigned char c; unsigned char c;
while (len) { while (len) {
int value;
c = in[len - 1]; c = in[len - 1];
if ((c >= '0') && (c <= '9')) value = hex_to_bin(c);
sum += mult * (c - '0'); if (value >= 0)
else if ((c >= 'A') && (c <= 'F')) sum += mult * value;
sum += mult * (c - ('A' - 10));
else if ((c >= 'a') && (c <= 'f'))
sum += mult * (c - ('a' - 10));
mult *= 16; mult *= 16;
--len; --len;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment