From ecc3099002c1cc87e9e4b3dc5fdf7821828f6733 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 10 Aug 2010 18:01:27 -0700 Subject: drivers: scsi: use newly introduced hex_to_bin() method Signed-off-by: Andy Shevchenko Cc: Adaptec OEM Raid Solutions Cc: "James E.J. Bottomley" Cc: James Smart Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/aacraid/rx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/scsi/aacraid') diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index 04057ab72a8..84d77fd86e5 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c @@ -352,9 +352,8 @@ static int aac_rx_check_health(struct aac_dev *dev) pci_free_consistent(dev->pdev, sizeof(struct POSTSTATUS), post, paddr); if (likely((buffer[0] == '0') && ((buffer[1] == 'x') || (buffer[1] == 'X')))) { - ret = (buffer[2] <= '9') ? (buffer[2] - '0') : (buffer[2] - 'A' + 10); - ret <<= 4; - ret += (buffer[3] <= '9') ? (buffer[3] - '0') : (buffer[3] - 'A' + 10); + ret = (hex_to_bin(buffer[2]) << 4) + + hex_to_bin(buffer[3]); } pci_free_consistent(dev->pdev, 512, buffer, baddr); return ret; -- cgit v1.2.3-18-g5258