]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/greth.c
Fix GCC format-security errors and convert sprintfs.
[u-boot] / drivers / net / greth.c
index 375646396a1008853ae072c83fcca9eb47346bb8..aa5d7114a5b8ddf0d164632eda0c634fa72318ac 100644 (file)
@@ -20,7 +20,7 @@
 #include <ambapp.h>
 #include <asm/leon.h>
 
-#include "greth.h"
+#include <grlib/greth.h>
 
 /* Default to 3s timeout on autonegotiation */
 #ifndef GRETH_PHY_TIMEOUT_MS
@@ -245,7 +245,7 @@ int greth_init_phy(greth_priv * dev, bd_t * bis)
        debug("GRETH PHY ADDRESS: %d\n", phyaddr);
 
        /* X msecs to ticks */
-       timeout = usec2ticks(GRETH_PHY_TIMEOUT_MS * 1000);
+       timeout = GRETH_PHY_TIMEOUT_MS * 1000;
 
        /* Get system timer0 current value
         * Total timeout is 5s
@@ -640,9 +640,9 @@ int greth_initialize(bd_t * bis)
 
        /* Make descriptor string */
        if (greth->gbit_mac) {
-               sprintf(dev->name, "GRETH_10/100/GB");
+               strcpy(dev->name, "GRETH_10/100/GB");
        } else {
-               sprintf(dev->name, "GRETH_10/100");
+               strcpy(dev->name, "GRETH_10/100");
        }
 
        /* initiate PHY, select speed/duplex depending on connected PHY */