cxgb3: re-use native hex2bin()
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>
This commit is contained in:
parent
51487ae736
commit
7aee42c676
|
@ -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);
|
p->xauicfg[1] = simple_strtoul(vpd.xaui1cfg_data, NULL, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 6; i++)
|
ret = hex2bin(p->eth_base, vpd.na_data, 6);
|
||||||
p->eth_base[i] = hex_to_bin(vpd.na_data[2 * i]) * 16 +
|
if (ret < 0)
|
||||||
hex_to_bin(vpd.na_data[2 * i + 1]);
|
return -EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue