projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51487ae
)
cxgb3: re-use native hex2bin()
author
Andy Shevchenko
<
[email protected]
>
Thu, 22 Jan 2015 21:37:39 +0000
(23:37 +0200)
committer
David S. Miller
<
[email protected]
>
Sun, 25 Jan 2015 08:09:41 +0000
(
00:09
-0800)
Call hex2bin() library function instead of doing conversion here.
Signed-off-by: Andy Shevchenko <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/chelsio/cxgb3/t3_hw.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/chelsio/cxgb3/t3_hw.c
b/drivers/net/ethernet/chelsio/cxgb3/t3_hw.c
index c74a898fcd4f7c41bd338ba08fa8e73b078ff5db..184a8d545ac4230e07788fbb831be2dcdfa57f83 100644
(file)
--- a/
drivers/net/ethernet/chelsio/cxgb3/t3_hw.c
+++ b/
drivers/net/ethernet/chelsio/cxgb3/t3_hw.c
@@
-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;
}