summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-01-15 13:40:04 +0200
committerFelipe Balbi <balbi@ti.com>2015-01-19 12:53:32 -0600
commit27f387059bedc3c4b3eb5b4c8bfe229dba59ce24 (patch)
treeb1f77f3efde490fd63186fbcbb51c38ef024a8c8 /drivers/usb/gadget
parentda89dba1a0c69ed01e33ebf41327b90993d08492 (diff)
downloadblackbird-op-linux-27f387059bedc3c4b3eb5b4c8bfe229dba59ce24.tar.gz
blackbird-op-linux-27f387059bedc3c4b3eb5b4c8bfe229dba59ce24.zip
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')
-rw-r--r--drivers/usb/gadget/function/u_ether.c4
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;
}
OpenPOWER on IntegriCloud