diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2011-07-18 22:26:40 -0700 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-07-22 09:37:49 +0000 |
commit | 11650b859681e03fdbf26277fcfc5f1f62186703 (patch) | |
tree | 1073305aa356589d05cf59c70dae748c4c0e8b75 /drivers/target/target_core_transport.c | |
parent | 163cd5fa9fcb7ccc73a9e39d5f601cfd41a23bfa (diff) |
target: remove custom hex2bin() implementation
This patch drops transport_asciihex_to_binaryhex() in favor of proper
hex2bin usage from include/linux/kernel.h:hex2bin()
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r-- | drivers/target/target_core_transport.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 007cfc164f5e..46352d658e35 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2659,34 +2659,6 @@ static inline u32 transport_get_size( return dev->se_sub_dev->se_dev_attrib.block_size * sectors; } -unsigned char transport_asciihex_to_binaryhex(unsigned char val[2]) -{ - unsigned char result = 0; - /* - * MSB - */ - if ((val[0] >= 'a') && (val[0] <= 'f')) - result = ((val[0] - 'a' + 10) & 0xf) << 4; - else - if ((val[0] >= 'A') && (val[0] <= 'F')) - result = ((val[0] - 'A' + 10) & 0xf) << 4; - else /* digit */ - result = ((val[0] - '0') & 0xf) << 4; - /* - * LSB - */ - if ((val[1] >= 'a') && (val[1] <= 'f')) - result |= ((val[1] - 'a' + 10) & 0xf); - else - if ((val[1] >= 'A') && (val[1] <= 'F')) - result |= ((val[1] - 'A' + 10) & 0xf); - else /* digit */ - result |= ((val[1] - '0') & 0xf); - - return result; -} -EXPORT_SYMBOL(transport_asciihex_to_binaryhex); - static void transport_xor_callback(struct se_cmd *cmd) { unsigned char *buf, *addr; |