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:
Andy Shevchenko 2015-01-15 13:40:04 +02:00 committed by Felipe Balbi
parent da89dba1a0
commit 27f387059b
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}