Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198306
b: refs/heads/master
c: 0496b55
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Linus Torvalds committed May 25, 2010
1 parent 91fee7a commit 931d4f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 903788892ea0fc7fcaf7e8e5fac9a77379fc215b
refs/heads/master: 0496b55c56d0be80e27f417f66690d97e5370f86
13 changes: 1 addition & 12 deletions trunk/drivers/isdn/gigaset/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,6 @@ static inline void ignore_cstruct_param(struct cardstate *cs, _cstruct param,
msgname, paramname);
}

/*
* convert hex to binary
*/
static inline u8 hex2bin(char c)
{
int result = c & 0x0f;
if (c & 0x40)
result += 9;
return result;
}

/*
* convert an IE from Gigaset hex string to ETSI binary representation
* including length byte
Expand All @@ -191,7 +180,7 @@ static int encode_ie(char *in, u8 *out, int maxlen)
while (*in) {
if (!isxdigit(in[0]) || !isxdigit(in[1]) || l >= maxlen)
return -1;
out[++l] = (hex2bin(in[0]) << 4) + hex2bin(in[1]);
out[++l] = (hex_to_bin(in[0]) << 4) + hex_to_bin(in[1]);
in += 2;
}
out[0] = l;
Expand Down

0 comments on commit 931d4f4

Please sign in to comment.