aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid
diff options
context:
space:
mode:
authorAndy Shevchenko <ext-andriy.shevchenko@nokia.com>2010-08-10 21:01:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 11:59:02 -0400
commitecc3099002c1cc87e9e4b3dc5fdf7821828f6733 (patch)
tree7dff340773a244ef2eac7907a6b88c0c4131ac3a /drivers/scsi/aacraid
parent3094141c6532a4f748425c21c091001f218da8ae (diff)
drivers: scsi: use newly introduced hex_to_bin() method
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Cc: Adaptec OEM Raid Solutions <aacraid@adaptec.com> Cc: "James E.J. Bottomley" <James.Bottomley@suse.de> Cc: James Smart <james.smart@emulex.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r--drivers/scsi/aacraid/rx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
index 04057ab72a8b..84d77fd86e5b 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)
352 pci_free_consistent(dev->pdev, sizeof(struct POSTSTATUS), 352 pci_free_consistent(dev->pdev, sizeof(struct POSTSTATUS),
353 post, paddr); 353 post, paddr);
354 if (likely((buffer[0] == '0') && ((buffer[1] == 'x') || (buffer[1] == 'X')))) { 354 if (likely((buffer[0] == '0') && ((buffer[1] == 'x') || (buffer[1] == 'X')))) {
355 ret = (buffer[2] <= '9') ? (buffer[2] - '0') : (buffer[2] - 'A' + 10); 355 ret = (hex_to_bin(buffer[2]) << 4) +
356 ret <<= 4; 356 hex_to_bin(buffer[3]);
357 ret += (buffer[3] <= '9') ? (buffer[3] - '0') : (buffer[3] - 'A' + 10);
358 } 357 }
359 pci_free_consistent(dev->pdev, 512, buffer, baddr); 358 pci_free_consistent(dev->pdev, 512, buffer, baddr);
360 return ret; 359 return ret;