mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 06:37:59 +00:00
usb: gadget: ethernet: re-use %pM specifier to print MAC
Instead of custom approach the patch converts code to use %pM specifier to print MAC. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
da89dba1a0
commit
27f387059b
1 changed files with 1 additions and 3 deletions
|
@ -729,9 +729,7 @@ static int get_ether_addr_str(u8 dev_addr[ETH_ALEN], char *str, int len)
|
|||
if (len < 18)
|
||||
return -EINVAL;
|
||||
|
||||
snprintf(str, len, "%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
dev_addr[0], dev_addr[1], dev_addr[2],
|
||||
dev_addr[3], dev_addr[4], dev_addr[5]);
|
||||
snprintf(str, len, "%pM", dev_addr);
|
||||
return 18;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue