Skip to content

Commit

Permalink
cxgb3: re-use native hex2bin()
Browse files Browse the repository at this point in the history
Call hex2bin() library function instead of doing conversion here.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andy Shevchenko authored and David S. Miller committed Jan 25, 2015
1 parent 51487ae commit 7aee42c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/chelsio/cxgb3/t3_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,9 @@ static int get_vpd_params(struct adapter *adapter, struct vpd_params *p)
p->xauicfg[1] = simple_strtoul(vpd.xaui1cfg_data, NULL, 16);
}

for (i = 0; i < 6; i++)
p->eth_base[i] = hex_to_bin(vpd.na_data[2 * i]) * 16 +
hex_to_bin(vpd.na_data[2 * i + 1]);
ret = hex2bin(p->eth_base, vpd.na_data, 6);
if (ret < 0)
return -EINVAL;
return 0;
}

Expand Down

0 comments on commit 7aee42c

Please sign in to comment.