diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-01-15 14:40:04 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-01-19 21:53:32 +0300 |
commit | 27f387059bedc3c4b3eb5b4c8bfe229dba59ce24 (patch) | |
tree | b1f77f3efde490fd63186fbcbb51c38ef024a8c8 /drivers/usb/gadget/function | |
parent | da89dba1a0c69ed01e33ebf41327b90993d08492 (diff) | |
download | linux-27f387059bedc3c4b3eb5b4c8bfe229dba59ce24.tar.xz |
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>
Diffstat (limited to 'drivers/usb/gadget/function')
-rw-r--r-- | drivers/usb/gadget/function/u_ether.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c index 6e6f87656e7b..f1fd777ef4ec 100644 --- a/drivers/usb/gadget/function/u_ether.c +++ b/drivers/usb/gadget/function/u_ether.c @@ -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; } |