diff options
author | Andy Shevchenko <ext-andriy.shevchenko@nokia.com> | 2010-02-22 08:10:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 04:24:24 -0500 |
commit | 003bdb279bb6b212f25ea4e60e0164b6109d3704 (patch) | |
tree | 9ddeeffa0587ca82480f1f6655ebc54509c7ac14 /drivers/isdn | |
parent | 1528b18f7ec2b907711f37667c68e10d9296c882 (diff) |
isdn: remove ishexdigit() in regard to isxdigit()
Samll cleanup in drivers/isdn/gigaset/capi.c where own implementation of
isxdigit() has been changed to kernel native one.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/gigaset/capi.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c index 20ebcee9b0c0..6643d6533ccb 100644 --- a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c | |||
@@ -171,20 +171,6 @@ static inline void ignore_cstruct_param(struct cardstate *cs, _cstruct param, | |||
171 | } | 171 | } |
172 | 172 | ||
173 | /* | 173 | /* |
174 | * check for legal hex digit | ||
175 | */ | ||
176 | static inline int ishexdigit(char c) | ||
177 | { | ||
178 | if (c >= '0' && c <= '9') | ||
179 | return 1; | ||
180 | if (c >= 'A' && c <= 'F') | ||
181 | return 1; | ||
182 | if (c >= 'a' && c <= 'f') | ||
183 | return 1; | ||
184 | return 0; | ||
185 | } | ||
186 | |||
187 | /* | ||
188 | * convert hex to binary | 174 | * convert hex to binary |
189 | */ | 175 | */ |
190 | static inline u8 hex2bin(char c) | 176 | static inline u8 hex2bin(char c) |
@@ -204,7 +190,7 @@ static int encode_ie(char *in, u8 *out, int maxlen) | |||
204 | { | 190 | { |
205 | int l = 0; | 191 | int l = 0; |
206 | while (*in) { | 192 | while (*in) { |
207 | if (!ishexdigit(in[0]) || !ishexdigit(in[1]) || l >= maxlen) | 193 | if (!isxdigit(in[0]) || !isxdigit(in[1]) || l >= maxlen) |
208 | return -1; | 194 | return -1; |
209 | out[++l] = (hex2bin(in[0]) << 4) + hex2bin(in[1]); | 195 | out[++l] = (hex2bin(in[0]) << 4) + hex2bin(in[1]); |
210 | in += 2; | 196 | in += 2; |