Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
usb: gadget: ethernet: re-use %pM specifier to print MAC
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
andy-shev authored and Felipe Balbi committed Jan 19, 2015
1 parent da89dba commit 27f3870
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/usb/gadget/function/u_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 27f3870

Please sign in to comment.