From: Andy Shevchenko on
From: Andy Shevchenko <ext-andriy.shevchenko(a)nokia.com>

to get hex digit from a binary format we may use kernel's hex_asc_*() methods.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko(a)nokia.com>
---
drivers/scsi/ibmmca.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c
index 9c1e6a5..52b03a6 100644
--- a/drivers/scsi/ibmmca.c
+++ b/drivers/scsi/ibmmca.c
@@ -1002,12 +1002,11 @@ static char *ti_p(int dev)
/* interpreter for logical device numbers (ldn) */
static char *ti_l(int val)
{
- const char hex[16] = "0123456789abcdef";
static char answer[2];

answer[1] = (char) (0x0);
if (val <= MAX_LOG_DEV)
- answer[0] = hex[val];
+ answer[0] = hex_asc_lo(val);
else
answer[0] = '-';
return (char *) &answer;
--
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/