Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7aee42c6 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller
Browse files

cxgb3: re-use native hex2bin()



Call hex2bin() library function instead of doing conversion here.

Signed-off-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 51487ae7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
}