]> err.no Git - linux-2.6/blobdiff - arch/powerpc/boot/devtree.c
[ARM] 4652/1: pxa: fix a typo of pxa27x usb host clk definition
[linux-2.6] / arch / powerpc / boot / devtree.c
index e1b8122b4393cc9873a76378a64ebd04deda9d1d..e5dfe449731393cb7aec718b4fd169964309def0 100644 (file)
@@ -88,27 +88,32 @@ void dt_fixup_clock(const char *path, u32 freq)
        }
 }
 
+void dt_fixup_mac_address(u32 index, const u8 *addr)
+{
+       void *devp = find_node_by_prop_value(NULL, "linux,network-index",
+                                            (void*)&index, sizeof(index));
+
+       if (devp) {
+               printf("ENET%d: local-mac-address <-"
+                      " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
+                      addr[0], addr[1], addr[2],
+                      addr[3], addr[4], addr[5]);
+
+               setprop(devp, "local-mac-address", addr, 6);
+       }
+}
+
 void __dt_fixup_mac_addresses(u32 startindex, ...)
 {
        va_list ap;
        u32 index = startindex;
-       void *devp;
        const u8 *addr;
 
        va_start(ap, startindex);
-       while ((addr = va_arg(ap, const u8 *))) {
-               devp = find_node_by_prop_value(NULL, "linux,network-index",
-                                              (void*)&index, sizeof(index));
-
-               printf("ENET%d: local-mac-address <-"
-                      " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
-                      addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
 
-               if (devp)
-                       setprop(devp, "local-mac-address", addr, 6);
+       while ((addr = va_arg(ap, const u8 *)))
+               dt_fixup_mac_address(index++, addr);
 
-               index++;
-       }
        va_end(ap);
 }