]> git.sur5r.net Git - u-boot/blobdiff - examples/standalone/smc911x_eeprom.c
ARM: implement relocation for arm1176
[u-boot] / examples / standalone / smc911x_eeprom.c
index fff312346460e375fc4cea64483c7138a508e4a8..00e826689f31b5001d3a3846c74088fab29254a4 100644 (file)
 
 #include <common.h>
 #include <exports.h>
-
-/* the smc911x.h gets base addr through eth_device' iobase */
-struct eth_device {
-       const char *name;
-       unsigned long iobase;
-       void *priv;
-};
 #include "../drivers/net/smc911x.h"
 
 /**
@@ -247,7 +240,7 @@ static void dump_eeprom(struct eth_device *dev)
 static int smc911x_init(struct eth_device *dev)
 {
        /* See if there is anything there */
-       if (!smc911x_detect_chip(dev))
+       if (smc911x_detect_chip(dev))
                return 1;
 
        smc911x_reset(dev);
@@ -320,11 +313,10 @@ static char *getline(void)
 /**
  *     smc911x_eeprom - our application's main() function
  */
-int smc911x_eeprom(int argc, char *argv[])
+int smc911x_eeprom(int argc, char * const argv[])
 {
        /* Avoid initializing on stack as gcc likes to call memset() */
        struct eth_device dev;
-       dev.name = __func__;
        dev.iobase = CONFIG_SMC911X_BASE;
 
        /* Print the ABI version */