Commit 0496b55c56d0be80e27f417f66690d97e5370f86
Committed by
Linus Torvalds
1 parent
903788892e
drivers: isdn: use new hex_to_bin() method
Remove own implementation of hex_to_bin(). Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Acked-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 1 additions and 12 deletions Side-by-side Diff
drivers/isdn/gigaset/capi.c
... | ... | @@ -170,17 +170,6 @@ |
170 | 170 | } |
171 | 171 | |
172 | 172 | /* |
173 | - * convert hex to binary | |
174 | - */ | |
175 | -static inline u8 hex2bin(char c) | |
176 | -{ | |
177 | - int result = c & 0x0f; | |
178 | - if (c & 0x40) | |
179 | - result += 9; | |
180 | - return result; | |
181 | -} | |
182 | - | |
183 | -/* | |
184 | 173 | * convert an IE from Gigaset hex string to ETSI binary representation |
185 | 174 | * including length byte |
186 | 175 | * return value: result length, -1 on error |
... | ... | @@ -191,7 +180,7 @@ |
191 | 180 | while (*in) { |
192 | 181 | if (!isxdigit(in[0]) || !isxdigit(in[1]) || l >= maxlen) |
193 | 182 | return -1; |
194 | - out[++l] = (hex2bin(in[0]) << 4) + hex2bin(in[1]); | |
183 | + out[++l] = (hex_to_bin(in[0]) << 4) + hex_to_bin(in[1]); | |
195 | 184 | in += 2; |
196 | 185 | } |
197 | 186 | out[0] = l; |