diff options
author | Andy Shevchenko <andy.shevchenko@gmail.com> | 2010-10-25 10:10:25 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-10-25 10:10:17 -0400 |
commit | f2777077aa1f6f8a7c76b83f240975289a9fb894 (patch) | |
tree | b415726907d700de7b3658f3bd53c02b2701f4c5 /drivers/s390 | |
parent | ed3640b285d831065eb0507cdca7d125f6f78e8d (diff) |
[S390] cio: remove custom implementation of hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/blacklist.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index 13cb60162e42..76058a5166ed 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c | |||
@@ -79,17 +79,15 @@ static int pure_hex(char **cp, unsigned int *val, int min_digit, | |||
79 | int max_digit, int max_val) | 79 | int max_digit, int max_val) |
80 | { | 80 | { |
81 | int diff; | 81 | int diff; |
82 | unsigned int value; | ||
83 | 82 | ||
84 | diff = 0; | 83 | diff = 0; |
85 | *val = 0; | 84 | *val = 0; |
86 | 85 | ||
87 | while (isxdigit(**cp) && (diff <= max_digit)) { | 86 | while (diff <= max_digit) { |
87 | int value = hex_to_bin(**cp); | ||
88 | 88 | ||
89 | if (isdigit(**cp)) | 89 | if (value < 0) |
90 | value = **cp - '0'; | 90 | break; |
91 | else | ||
92 | value = tolower(**cp) - 'a' + 10; | ||
93 | *val = *val * 16 + value; | 91 | *val = *val * 16 + value; |
94 | (*cp)++; | 92 | (*cp)++; |
95 | diff++; | 93 | diff++; |