Merge branches 'for-4.16/upstream' and 'for-4.15/upstream-fixes' into for-linus
[sfrench/cifs-2.6.git] / drivers / hid / hid-sony.c
index 432d9a47cab0bb9a366ed2831b993efc9c445d1c..ccdc5f2d01b1063080a588dfbd2d65be5e571b59 100644 (file)
@@ -2450,10 +2450,7 @@ static int sony_check_add(struct sony_sc *sc)
                memcpy(sc->mac_address, &buf[1], sizeof(sc->mac_address));
 
                snprintf(sc->hdev->uniq, sizeof(sc->hdev->uniq),
                memcpy(sc->mac_address, &buf[1], sizeof(sc->mac_address));
 
                snprintf(sc->hdev->uniq, sizeof(sc->hdev->uniq),
-                       "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
-                       sc->mac_address[5], sc->mac_address[4],
-                       sc->mac_address[3], sc->mac_address[2],
-                       sc->mac_address[1], sc->mac_address[0]);
+                        "%pMR", sc->mac_address);
        } else if ((sc->quirks & SIXAXIS_CONTROLLER_USB) ||
                        (sc->quirks & NAVIGATION_CONTROLLER_USB)) {
                buf = kmalloc(SIXAXIS_REPORT_0xF2_SIZE, GFP_KERNEL);
        } else if ((sc->quirks & SIXAXIS_CONTROLLER_USB) ||
                        (sc->quirks & NAVIGATION_CONTROLLER_USB)) {
                buf = kmalloc(SIXAXIS_REPORT_0xF2_SIZE, GFP_KERNEL);
@@ -2483,10 +2480,7 @@ static int sony_check_add(struct sony_sc *sc)
                        sc->mac_address[5-n] = buf[4+n];
 
                snprintf(sc->hdev->uniq, sizeof(sc->hdev->uniq),
                        sc->mac_address[5-n] = buf[4+n];
 
                snprintf(sc->hdev->uniq, sizeof(sc->hdev->uniq),
-                       "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
-                       sc->mac_address[5], sc->mac_address[4],
-                       sc->mac_address[3], sc->mac_address[2],
-                       sc->mac_address[1], sc->mac_address[0]);
+                        "%pMR", sc->mac_address);
        } else {
                return 0;
        }
        } else {
                return 0;
        }